Which AWS service should the developer use to accomplish this goal?
AWS Trusted Advisor
Amazon CloudWatch
AWS X-Ray
AWS CloudTrail
Explanations:
AWS Trusted Advisor provides best practice recommendations for cost, performance, security, and fault tolerance but does not offer tracing capabilities for troubleshooting Lambda functions.
Amazon CloudWatch monitors and logs Lambda function metrics but does not provide distributed tracing needed to pinpoint the root cause in complex applications.
AWS X-Ray provides distributed tracing, which allows the developer to trace requests across services and troubleshoot performance issues, making it ideal for Lambda function troubleshooting.
AWS CloudTrail logs API calls for auditing purposes but does not provide detailed tracing for debugging Lambda functions.