Which solution will meet these requirements?
Enable AWS X-Ray active tracing in the Lambda function. Review the logs in X-Ray.
Configure AWS CloudTrail. View the trail logs that are associated with the Lambda function.
Review the AWS Config logs in Amazon CloudWatch.
Review the Amazon CloudWatch logs that are associated with the Lambda function.
Explanations:
Enabling AWS X-Ray active tracing allows the developer to visualize and analyze the latency of requests across various AWS services. It provides insights into service calls, error rates, and performance bottlenecks without modifying the Lambda function code.
AWS CloudTrail logs API calls and user activity but does not provide detailed insights into the performance or traffic between AWS services during the execution of a Lambda function. It is more focused on auditing and governance.
AWS Config is used for tracking AWS resource configurations and compliance, not for analyzing traffic or performance of AWS services involved in a Lambda function’s execution. It won’t provide the necessary insights into the operational metrics of the Lambda function.
Amazon CloudWatch logs provide visibility into the logs generated by the Lambda function but do not give a complete view of the traffic or interactions between different AWS services. They primarily show the output and errors from the function itself, not the latencies involved in service calls.