A city inspection Lambda is invoked by API Gateway proxy events and by SQS. The team wants CI to invoke the function the same way every build. Where should the JSON test event payloads live?
Select an answer to reveal the explanation.
Short Explanation
Same script, same cue cards—every rehearsal. Keep API Gateway and SQS test event JSON beside the SAM template so CI hits a known shape. Console typing and raw prod logs are flaky or unsafe.
Full Explanation
A city inspection Lambda invoked by API Gateway proxy events and by SQS should keep versioned application test event JSON files next to the SAM template so CI can run repeatable invokes for both event shapes. Checked-in fixtures make municipal CI deterministic: every build exercises the same proxy and SQS envelopes the function will see in AWS, including field names that often break during refactors. Hand-typing console events does not scale, audit, or reproduce across agents.
Hand-typing a new event in the Lambda console for each CI run and screenshotting the result fails as a non-automated, non-repeatable process unfit for pipelines. Storing only production CloudWatch Logs excerpts and replaying them without redaction fails conceptually by risking PII in fixtures and depending on opportunistic production traffic shapes. Omitting event payloads and asserting only that the SAM template packages without error fails because packaging success is not invoke or handler success.
Exam caveat: keep separate fixtures per event source and update them when API Gateway or SQS envelope fields change across runtime versions. Operational check: wire CI to sam local invoke or a cloud invoke job using the committed JSON events for both shapes, and fail the build when either path regresses.