Remediation
Enable Active X-Ray Tracingβ
Active tracing allows Lambda to send trace data to X-Ray for all incoming requests, providing full visibility into request execution and interactions with downstream services.
From Command Lineβ
-
Ensure the Lambda function has permission to upload trace data to X-Ray. Attach the
AWSXRayDaemonWriteAccessmanaged IAM policy to the function's execution role:aws iam attach-role-policy \
--role-name {{function-execution-role}} \
--policy-arn "arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess" -
Enable active tracing on the Lambda function:
aws lambda update-function-configuration \
--function-name {{function-name}} \
--tracing-config Mode=Active