Testing and Deployment
Which AWS SAM capability runs a Lambda function locally with a supplied event to check its behavior?
Show the answer
Correct answerB. SAM local invocation
AWhy not this: Deployment provisions or updates AWS resources rather than running a local test.
BWhy this is right: Local invocation executes the function locally with an event so its behavior can be checked.
CWhy not this: Template validation checks the infrastructure template rather than executing function code.
DWhy not this: Event generation produces sample input payloads rather than executing the function.
SAM local invocation runs function code locally using a supplied event. SAM event generation creates sample event payloads but does not execute the function.