Support cannot stitch API Gateway access logs to Lambda log lines for one citizen complaint because nothing ties the records together. What should the app include?
Select an answer to reveal the explanation.
Short Explanation
Without a shared request id, API Gateway and Lambda logs are two novels with no chapter numbers. Stamp a correlation id across the path and support can follow one citizen end to end.
Full Explanation
When support cannot stitch API Gateway access logs to Lambda log lines for one citizen complaint because nothing ties the records together, the application should propagate a correlation or request ID across those layers. A single identifier—often from API Gateway's request ID or an application trace/correlation header—written into every log line lets municipal support reconstruct one journey without guessing timestamps across disconnected streams.
Removing all request identifiers to shorten logs destroys investigability and hurts compliance-minded incident response.
Storing only the AWS account ID on every line provides no per-request discrimination among thousands of concurrent citizens.
Monthly Cost Explorer reports cannot correlate individual API requests to Lambda log lines.
Exam caveat: Correlation IDs are a basic observability practice on DVA-C02 troubleshooting and instrumentation questions.
Operational check: Emit and forward a request/correlation ID from API Gateway into Lambda logs (and traces), query Insights by that ID for a sample complaint, and confirm support can rebuild the timeline in minutes. Keep the civic/municipal context in mind: citizen complaints about permits or payments require fast, precise log stitching under public scrutiny.