AWS metrics: metric streams
Complexity: Moderate | Infrastructure: Stream + Firehose + IAM | Latency: Near real time
You create a CloudWatch Metric Stream that selects which metrics to export. The stream delivers to an Amazon Data Firehose stream, which batches the metrics and forwards them to Grafana Cloud’s ingestion endpoint. You deploy the Metric Stream, the Firehose delivery stream, and the IAM roles in your AWS account, and you can template all of it with Terraform or CloudFormation.
You also create a resource metadata scrape job. It periodically fetches your AWS resource tags and metadata, which Grafana Cloud combines with the streamed metrics to enrich them with context like resource ARNs and tags.
Considerations
- Near real-time delivery; the reference configuration buffers for 60 seconds before delivery, and the first metrics can take 2-3 minutes to appear
- If the stream is active and metrics still don’t appear, check that the access policy token has
metric:writeand that the Firehose ingest URL is correct - Scalability
- No metric scrape schedule; the resource metadata scrape job still runs on an interval
- AWS infrastructure to deploy: the Metric Stream, an Amazon Data Firehose delivery stream, and IAM roles
- A resource metadata scrape job to enrich metrics with resource ARNs and tags
- Upfront setup, which you can template with Terraform or CloudFormation
Note
Both Terraform and CloudFormation need an access policy token with
metric:write, which requires the Admin role to create.
When to use
- Production monitoring where near-real-time delivery matters
- Environments that scale across multiple AWS accounts
- Setups where you want no metric scrape schedule
Documentation
View the AWS metric streams documentation.