amazon-web-servicesaws-lambdaaws-amplifyaws-xray

Enable XRAY on a lambda function using AWS Amplify


What is the recommended way to do enable XRAY on a Lambda function using AWS Amplify?


Solution

  • Edit the CloudFormation that Amplify generates

    1. Set TracingConfig's mode to 'Active` in the AWS::Lambda::Function.

    2. Make sure your Lambda's role has permissions for X-Ray

    "xray:PutTraceSegments",
    "xray:PutTelemetryRecords"