Before pushing a grants Lambda that occupies the shared sandbox, a developer wants a quick local check with a fixture event. Which tool fits?
Select an answer to reveal the explanation.
Short Explanation
Try the fixture at your desk before hogging the shared sandbox. sam local invoke is the associate's dress rehearsal for a grants function. Skipping to shared or poking production aliases wastes everyone's queue time.
Full Explanation
Before pushing a grants Lambda that occupies the shared sandbox, a developer should run sam local invoke with a fixture event for a quick local check. SAM local tooling lets municipal developers validate handler behavior against representative events without immediately contending for shared sandbox resources or polluting team environments with every save. Local invoke is the Domain 3-friendly first gate prior to shared-environment deploys.
Pushing straight to the shared sandbox without any local invoke because SAM has no local tooling fails factually and operationally—SAM does provide local invoke, and skipping it wastes shared sandbox capacity. Only validating by uploading the zip to production with a one-minute alias weight fails conceptually by using citizens as the first test. Replacing local tests with emailing the fixture event to every teammate fails as a non-executable, non-automated check.
Exam caveat: local invoke approximates but does not perfectly mirror IAM, VPC, or service integrations; still follow with sandbox validation before QA. Operational check: keep versioned fixture events next to the function, run sam local invoke in CI or pre-push hooks, and require a green local invoke before shared sandbox deploy jobs run.