Sample question 1 · Troubleshooting and Optimization (18%)
Polaris Cargo Networks, a regional logistics startup operating in Southeast Asia, recently launched an API-driven partner onboarding portal built on Amazon API Gateway and AWS Lambda. The portal issues short-lived TLS client certificates to new carrier partners. A senior partner, Dawnstar Shipping Co., has formally complained to Polaris's CTO that their onboarding API calls intermittently return HTTP 500 errors. The CTO has asked the development team to provide a stakeholder-ready explanation of the failure pattern, including whether the errors are consistent or random, and whether they correlate with specific API resources or Lambda cold starts. As the AWS developer, which combination of AWS observability tools will MOST effectively help you determine whether the HTTP 500 errors are caused by Lambda cold starts, a specific API resource path, or an application exception — and produce findings suitable for a stakeholder briefing?
- A. Enable API Gateway access logging to a CloudWatch Logs log group with a log format that includes $context.resourcePath, $context.status, and $context.integrationStatus, then use CloudWatch Logs Insights to group errors by resource path; simultaneously review Lambda CloudWatch Logs for INIT_START entries to identify cold start invocations coinciding with 500 errors.
- B. Configure an Amazon CloudWatch alarm on the API Gateway 5XXError metric with a threshold of one error per minute and subscribe an Amazon SNS topic to notify the CTO in real time, then wait for the next occurrence to capture live log data.
- C. Enable AWS X-Ray on the Lambda function only and review subsegment annotations to determine which downstream service call is faulting, then present the X-Ray service map screenshot to the CTO as the stakeholder briefing artifact.
- D. Increase the Lambda function's reserved concurrency to eliminate cold starts, redeploy the function, and monitor the API Gateway 5XXError CloudWatch metric over 48 hours to determine if the error rate decreases before conducting any log analysis.
View answer & explanation
Correct answer: A. Enable API Gateway access logging to a CloudWatch Logs log group with a log format that includes $context.resourcePath, $context.status, and $context.integrationStatus, then use CloudWatch Logs Insights to group errors by resource path; simultaneously review Lambda CloudWatch Logs for INIT_START entries to identify cold start invocations coinciding with 500 errors.
[Domain 4 - Troubleshooting and Optimization, Subtopic 4 - Troubleshooting and Optimization - Area 1 - CloudWatch Logs] Core Concept: Troubleshoot application failures using AWS tools. centers on cloudwatch logs as defined in the official (ISC)² exam outline. Correct Answer (A): Enable API Gateway access logging to a CloudWatch Logs log group with a log format that includes $context.resourcePath, $context.status, and $context.integrationStatus, then use CloudWatch Logs Insights to group errors by resource path; simultaneously review Lambda CloudWatch Logs for INIT_START entries to identify cold start invocations coinciding with 500 errors. Why the other options are incorrect: Option B: Configuring a CloudWatch alarm on the 5XXError metric provides real-time notification of error rate thresholds but does not capture the resource path, integration status, or cold start context needed to explain the failure pattern; waiting for the next occurrence without pre-configured structured logging delays the investigation and does not produce the analytical depth required for a stakeholder briefing. Option C: Enabling X-Ray only on the Lambda function and presenting the service map addresses downstream subsegment faults but omits the API Gateway layer entirely; without API Gateway access logs, the developer cannot determine whether errors are path-specific or correlate with cold starts, and a service map screenshot alone is insufficient as a stakeholder briefing artifact without supporting log evidence. Option D: Increasing reserved concurrency to eliminate cold starts is a remediation action, not a diagnostic step; applying a fix before completing root cause analysis risks masking the actual failure mechanism, and monitoring a metric over 48 hours without structured log data cannot confirm whether cold starts were the true cause or whether an application exception is independently generating 500 errors.