- Newest
- Most votes
- Most comments
To assign a custom name for your Lambda function in the CloudWatch Application Map, you need to use the OTEL_RESOURCE_ATTRIBUTES environment variable rather than OTEL_SERVICE_NAME.
For Lambda functions, you can add this environment variable with a value that includes the Application attribute:
OTEL_RESOURCE_ATTRIBUTES="Application=YourCustomAppName,Owner=Test,aws.application_signals.metric_resource_keys=Application&Owner"
This will allow you to define a custom application name that will be displayed in the Application Map instead of the default "StandaloneLambda" label.
Similarly, for your ECS service, you can add the OTEL_RESOURCE_ATTRIBUTES to the TaskDefinition:
{
"name": "my-app",
...
"environment": [
{
"name": "OTEL_RESOURCE_ATTRIBUTES",
"value": "service.name=$YOUR_SVC_NAME,Application=YourCustomAppName,Owner=Test,aws.application_signals.metric_resource_keys=Application&Owner"
},
...
]
}
The CloudWatch agent determines the service name from various sources in priority order, with Application Signals instrumentation being the highest priority. By setting these attributes correctly, you can control how your applications appear in the Application Map.
Sources
View your application topology and monitor operational health with the CloudWatch application map - Amazon CloudWatch
Using the CloudWatch agent with related telemetry - Amazon CloudWatch
answered a year ago
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago

I've set this up as mentioned, but the Lambda function still appears as
StandaloneLambda