Before promoting a citizen-portal Lambda to the shared test stage, developers must invoke it locally with a realistic API Gateway proxy event. Which approach best meets that need?
Select an answer to reveal the explanation.
Short Explanation
You would not debut a new bus route without a dry run—same idea here. SAM (or similar Lambda tooling) lets you fire a sample API Gateway proxy event at the function before it hits the shared stage. Skipping shape checks until production is how surprise 500s sneak into citizen portals.
Full Explanation
AWS SAM and related Lambda test tooling support local or SAM-environment invokes with representative JSON event payloads, including API Gateway proxy events. Validating request shape, path parameters, and authorizer context before a shared-environment deploy reduces integration defects. Production-only testing, hardcoded success stubs, and metrics-only checks do not exercise the event contract.