Q8 — AWS DVA-C02 Ch.3

Question 8 of 100 | ← Chapter 3

A developer is troubleshooting an Amazon API Gateway API. When a client attempts to access an endpoint of the API, the client receives an HTTP 400 response error. How can the developer determine the cause of these errors?

Correct Answer: D. Enable execution logging and access logging for the API’s stage and configure them to Amazon CloudWatch Logs. Create a CloudWatch Logs log group. Specify the log group’s ARN for the API’s stage.

Explanation

Option D recommends enabling execution logs and access logs for the API stage and configuring them to Amazon CloudWatch Logs, then creating a CloudWatch Logs log group and specifying its ARN for the API stage. This captures detailed API call information—including requests and responses—helping identify the root cause of HTTP 400 errors. Issues with other options: Option A’s Kinesis Data Firehose delivery stream, while capable of logging, is less direct than CloudWatch Logs for diagnosing HTTP 400 errors. Option B’s CloudTrail Insights focuses on security risk detection and prediction, not granular API request/response details. Option C’s AWS X-Ray provides distributed tracing but is more suited for application-level tracing and less effective than CloudWatch Logs for debugging API Gateway HTTP 400 errors.