Collecting CPU and memory metrics for AWS Lambda MicroVMs
Compute Blog
This article explains how to collect CPU and memory metrics from AWS Lambda MicroVMs using the CloudWatch Agent with telegraf and OpenTelemetry.
- Configure telegraf to emit CPU and memory metrics every 60 seconds from within the MicroVM
- Use OpenTelemetry to process metrics and export them to CloudWatch with custom dimensions from Lambda-injected environment variables
- Install CloudWatch Agent in your Dockerfile and start it as a background process via an entrypoint script
- Ensure the MicroVM execution role has cloudwatch:PutMetricData permissions
- Verify metrics appear in CloudWatch console under the LambdaMicroVms/Application namespace
Monitoring CPU and memory utilization helps right-size MicroVMs, debug service health, and identify scaling signals for production workloads.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
Jun 22
2026
2026
Run isolated sandboxes with full lifecycle control: AWS Lambda introduces MicroVMs
Jun 22
2026
2026
AWS introduces Lambda MicroVMs for isolated execution of user and AI-generated code
Jul 20
2026
2026
JVM memory, CPU, and classpath best practices for Java containers on AWS
Jul 10
2026
2026
Announcing Lambda MicroVMs: serverless compute environments with VM-level isolation and near-instant startup
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.