aws-embedded-metrics
AWS Embedded Metrics Package
Decision gist · record as of 2026-08-14
Yes. The package is production-stable, actively maintained, has low install friction, permissive licensing, and no known vulnerabilities. It solves a real AWS monitoring problem—emitting custom metrics without blocking calls or external dependencies—and is widely used (top 5000 PyPI packages). Install it if you need to publish CloudWatch metrics from Lambda or other AWS compute environments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single runtime dependency (aiohttp).
- Actively maintained with recent commits and production-stable status.
- Supports current Python versions (3.6+).
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
last release 2026-03-27 (140 days) · last repo commit 2026-03-26 · 230 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,791,041 downloads/mo, #3,555 on PyPI
Alternatives
Verify before relying
pip install aws-embedded-metrics
from aws_embedded_metrics import metric_scope
from aws_embedded_metrics.storage_resolution import StorageResolution
@metric_scope
def my_handler(metrics):
metrics.put_dimensions({"Foo": "Bar"})
metrics.put_metric("ProcessingLatency", 100, "Milliseconds", StorageResolution.STANDARD)
metrics.set_property("RequestId", "422b1569-16f6-4a03")
return {"message": "Hello!"}- Whether aiohttp is required for all use cases or only for async operations
- Performance characteristics with high-throughput generators and the v4.0 flush behavior change
What it is and what it does
aws-embedded-metrics is a Python library for publishing custom CloudWatch metrics alongside structured log events. It wraps metric emission in the Embedded Metric Format (EMF), which CloudWatch automatically extracts so you can visualize, alarm on, and aggregate metrics in real time without writing custom batching code or making blocking network requests. The library automatically injects environment metadata (Lambda version, EC2 instance IDs, etc.) into logs and supports both standard and high-resolution metrics.
You decorate your function with @metric_scope, then call methods like put_metric(), put_dimensions(), and set_property() on the metrics object to record values and context. The library handles flushing metrics to CloudWatch and formatting them according to EMF. It works across Lambda, EC2, ECS, EKS, and on-premises environments (the latter via CloudWatch Agent), and integrates with CloudWatch Logs Insights for querying high-cardinality context that wouldn't be suitable as metric dimensions.
Use it for
- Emit custom metrics from Lambda functions without custom batching or blocking network calls
- Link metrics to high-cardinality context (request IDs, device IDs) queryable via CloudWatch Logs Insights
- Monitor aggregated values across EC2, ECS, EKS, or on-premises compute while preserving detailed event logs
- Track both standard (1-minute) and high-resolution (sub-minute) metrics from application code
- Automatically capture environment metadata (Lambda version, instance IDs) alongside custom metrics
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is production-stable, actively maintained, has low install friction, permissive licensing, and no known vulnerabilities. It solves a real AWS monitoring problem—emitting custom metrics without blocking calls or external dependencies—and is widely used (top 5000 PyPI packages). Install it if you need to publish CloudWatch metrics from Lambda or other AWS compute environments.
Install
aws-embedded-metrics on PyPI
Before you install
Low install friction with a single runtime dependency (aiohttp). Actively maintained with recent commits and production-stable status. Supports current Python versions (3.6+).
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install aws-embedded-metrics
from aws_embedded_metrics import metric_scope
from aws_embedded_metrics.storage_resolution import StorageResolution
@metric_scope
def my_handler(metrics):
metrics.put_dimensions({"Foo": "Bar"})
metrics.put_metric("ProcessingLatency", 100, "Milliseconds", StorageResolution.STANDARD)
metrics.set_property("RequestId", "422b1569-16f6-4a03")
return {"message": "Hello!"}
Verify before relying
- Whether aiohttp is required for all use cases or only for async operations
- Performance characteristics with high-throughput generators and the v4.0 flush behavior change
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageaiohttp |
| Maintenance | Actively maintained 140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,791,041 / month, #3,555 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: aws_embedded_metrics-3.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cloudwatch metrics logging”
- aws-embedded-metricsGenerates CloudWatch metrics embedded within structured log events,…
- awsmeSends AWS CloudWatch metrics asynchronously and in batches from…
- awslabs.cloudwatch-mcp-serverExposes CloudWatch metrics, logs, alarms, and PromQL queries through…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also awsme · aws-cdk.aws-cloudwatch · awslogs · awslabs.cloudwatch-mcp-server · lambda-warmer-py · cloudwatch · aws-cdk.aws-logs · watchtower · r7insight-python · azure-monitor-querymetrics