DVA-C02 Question 328
Select 3Your team has deployed a serverless application using AWS Lambda, Amazon API Gateway, and Amazon DynamoDB. You want to implement a logging and monitoring system to track performance metrics, debug errors, and analyze request patterns. Which combination of services and features should you use to achieve this effectively?
- A
Enable AWS X-Ray tracing for Lambda functions and API Gateway.
- B
Use Amazon CloudWatch Logs to collect and analyze logs from your Lambda functions.
- C
Enable DynamoDB Streams to capture item-level changes in DynamoDB tables.
- D
Set up Amazon CloudTrail to monitor API calls to your AWS environment.
- E
Deploy an Amazon S3 bucket to store log data generated by your application.
Show answer and explanation
Correct answers: A, B, D
Explanation
To effectively implement logging and monitoring for a serverless application, you should use AWS X-Ray for request tracing, Amazon CloudWatch Logs for collecting and analyzing logs, and Amazon CloudTrail for auditing API calls. These services together provide a robust solution for performance monitoring, debugging, and security auditing. DynamoDB Streams and Amazon S3 are not directly relevant to the logging and monitoring objectives in this scenario.
- A. Correct.
Correct: AWS X-Ray provides tracing capabilities to analyze the performance and debugging of distributed applications, including Lambda and API Gateway.
- B. Correct.
Correct: Amazon CloudWatch Logs helps collect and analyze logs from your Lambda functions, offering insights into application behavior and errors.
- C. Incorrect.
Incorrect: DynamoDB Streams is used for capturing changes in DynamoDB tables, but it's not designed for logging or monitoring the application directly.
- D. Correct.
Correct: Amazon CloudTrail tracks API activity, providing a comprehensive audit log for monitoring API calls across AWS services.
- E. Incorrect.
Incorrect: While you can store logs in Amazon S3, it is not an effective logging or monitoring solution compared to CloudWatch Logs or X-Ray.