0 votes
in AWS by

You're developing an AWS Lambda function that is interacting with a DynamoDB table. The function was working well, but now it is giving the results with a time delay. You need to debug the code to understand where the bottleneck is which is causing the performance issue. Which of the following is the ideal way to debug the code?

A. Use Log statements in the code to detect the delay.

B. Use Cloudwatch logs to detect where the delay could be.

C. Look at the throttling errors in Cloudwatch metrics.

D. Use AWS X-Ray to see where the downstream delay could be.

1 Answer

0 votes
by

Answer - D.

With AWS X-Ray, you can actually see traces in your AWS Lambda function, allowing you to see a detailed level of tracing to your downstream services.

The below snapshot from the AWS documentation shows an example of this.

Option A is incorrect since this is not an efficient way to check for performance errors.

Option B is incorrect since the logs might not be able to give you that level of tracing to detect the error.

Option C is incorrect since throttling errors will not give you the cause of the performance issue.

Related questions

0 votes
asked Apr 23 in AWS by DavidAnderson
0 votes
asked Apr 24 in AWS by DavidAnderson
...