Search code examples
amazon-web-servicesaws-lambdaamazon-snsaws-xray

AWS X-Ray trace for SNS used in Lambda functions


I have a AWS lambda function written in NodeJS, on which I enabled Active Tracing, and now I see the X-Ray trace every time it's called. But - the Lambda function also publishes to an SNS, and the SNS does not appear in the X-Ray traces. Do I need to add code in order to see the SNS trace?

(The lambda and SNS are both using the same Role, so I think it's not the issue).

Thanks!


Solution

  • To see more details inside your lambda function, you will need to make some changes on your function code. You can take a look at http://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-nodejs-awssdkclients.html for how to trace AWS SDK calls.