AWS CloudWatch Metrics
This integration is not available in federal environments
To learn more, read LaunchDarkly in federal environments.Overview
This topic explains how to stream AWS CloudWatch metrics from your AWS account to LaunchDarkly’s observability features. This integration allows you to monitor your AWS infrastructure alongside your feature flag data for unified observability.
The integration uses AWS CloudWatch Metric Streams to send metrics in real-time using the OpenTelemetry format. Data is delivered using Amazon Kinesis Data Firehose to LaunchDarkly’s OpenTelemetry Protocol (OTLP) endpoint.
Prerequisites
To use the AWS CloudWatch Metrics integration, you require:
- A LaunchDarkly client-side ID for your target environment
- AWS account with permissions to create:
- CloudWatch Metric Streams
- Kinesis Data Firehose delivery streams
- S3 buckets
- IAM roles and policies
- AWS CLI installed and configured (optional, for command-line deployment)
To find and copy your LaunchDarkly client-side ID, follow the instructions under View or copy keys and credentials.
Deploy the CloudFormation template
You can deploy the AWS CloudWatch Metrics integration using the AWS CloudFormation console or the AWS CLI.
Deploy using the AWS Console
To deploy using the AWS Console:
- Copy the CloudFormation template below and save it as a file named
metric-stream.yaml. - Open the AWS CloudFormation console.
- Click Create stack and select With new resources (standard).
- Select Upload a template file, click Choose file, and select the
metric-stream.yamlfile you saved. - Click Next.
- Enter a Stack name, such as
launchdarkly-metrics-stream. - Enter your the client-side ID from your LaunchDarkly environment into LaunchDarklyClientSideID.
- Click Next through the remaining steps.
- On the final page, acknowledge that CloudFormation will create IAM resources by checking the checkbox.
- Click Submit.
The stack takes 3-5 minutes to create. After creation completes, metrics begin flowing to LaunchDarkly.
Deploy using the AWS CLI
To deploy using the AWS CLI:
- Download the CloudFormation template:
- Create the CloudFormation stack:
Replace YOUR_CLIENT_SIDE_ID with your LaunchDarkly environment’s client-side ID.
- Monitor the stack creation:
What the template creates
The CloudFormation template creates the following AWS resources:
- CloudWatch Metric Stream: Captures all CloudWatch metrics from all AWS services in real-time
- Kinesis Data Firehose Delivery Stream: Buffers and delivers metrics to the LaunchDarkly OTLP endpoint
- S3 Backup Bucket: Stores failed metric deliveries for troubleshooting (14-day retention)
- IAM Roles: Least-privilege roles for the metric stream and Firehose delivery stream
All metrics from all AWS namespaces such as EC2, Lambda, RDS, DynamoDB, and ECS are streamed automatically, providing comprehensive visibility into your AWS infrastructure.
View metrics in LaunchDarkly Observability
After deployment, metrics appear in the LaunchDarkly observability dashboard within 1-2 minutes.
To view your metrics:
- Navigate to Observability in LaunchDarkly.
- Select the environment you configured.
- Navigate to the Metrics tab.
- Use the metric explorer to query and visualize your AWS CloudWatch metrics.
Metrics are tagged with their AWS namespace, region, and resource identifiers for easy filtering.
Filter metrics by namespace (optional)
By default, the integration sends all AWS CloudWatch metrics from all services, providing complete observability coverage. If you need to reduce cost and data volume for specific use cases, you can optionally filter to specific AWS service namespaces.
To filter metrics to specific namespaces:
- Download and open the CloudFormation template in a text editor.
- Locate the
MetricStreamresource. - Add an
IncludeFilterssection, similar to:
- Save the template and deploy or update the stack.
For a complete list of AWS service namespaces, read AWS services that publish CloudWatch metrics in the AWS documentation.