Clients receive HTTP 400 errors when calling an Amazon API Gateway endpoint. How can a developer investigate the cause of these 400 responses?
Choose an answer
Tap an option to check your answer.
Correct answer: Enable execution logging and access logging for the API stage in CloudWatch Logs and supply the ARN of a CloudWatch Logs log group for the stage..
Why this is the answer
The correct approach is to enable execution logging and access logging for the API Gateway stage in CloudWatch Logs. Execution logs provide detailed information about requests, responses, and errors, including the full request and response bodies, which is crucial for diagnosing HTTP 400 errors. Access logs record who accessed your API and how, offering insights into client behavior. Supplying the ARN of a CloudWatch Logs log group ensures these logs are centrally stored and queryable. Incorrect options: Kinesis Data Firehose is for streaming data to various destinations, not directly for API Gateway logging. API Gateway integrates directly with CloudWatch Logs. CloudTrail Insights focuses on unusual API activity and security analysis, not detailed request/response debugging for individual API calls. AWS X-Ray is for distributed tracing and performance analysis, showing how requests flow through services, but it doesn't provide the detailed request/response payloads needed to debug HTTP 400 errors at the API Gateway level.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed