AWS Certified Developer – Associate — Question 204
A developer is troubleshooting an Amazon API Gateway API. Clients are receiving HTTP 400 response errors when the clients try to access an endpoint of the API.
How can the developer determine the cause of these errors?
Answer options
- A. Create an Amazon Kinesis Data Firehose delivery stream to receive API call logs from API Gateway. Configure Amazon CloudWatch Logs as the delivery stream’s destination.
- B. Turn on AWS CloudTrail Insights and create a trail. Specify the Amazon Resource Name (ARN) of the trail for the stage of the API.
- C. Turn on AWS X-Ray for the API stage. Create an Amazon CloudWatch Logs log group. Specify the Amazon Resource Name (ARN) of the log group for the API stage.
- D. Turn on execution logging and access logging in Amazon CloudWatch Logs for the API stage Create a CloudWatch Logs log group. Specify the Amazon Resource Name (ARN) of the log group for the API stage.
Correct answer: D
Explanation
The correct answer is D because enabling execution and access logging in Amazon CloudWatch Logs allows the developer to capture detailed information about API requests and responses, which can help identify the cause of the HTTP 400 errors. The other options involve monitoring or logging methods that do not directly provide the necessary information to troubleshoot API Gateway errors effectively.