AWS Certified Developer Associate DVA-C02 Practice Question
A developer is building a serverless application using the AWS Serverless Application Model (AWS SAM) and needs to test their Lambda function's logic on their local machine before deploying it to the AWS cloud. Which AWS SAM CLI command should the developer use to perform a single, local invocation of the function?
The correct command for a one-time local invocation of a Lambda function is sam local invoke. This command builds the function in a local container that emulates the AWS Lambda environment and then runs it once. sam local start-api is used to start a local server that emulates Amazon API Gateway, not for single function invocation. sam deploy is used to deploy the application to the AWS cloud, not for local testing. sam test is not a valid AWS SAM CLI command.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the AWS SAM CLI `sam local invoke` command used for?
Open an interactive chat with Bash
How does the `sam local invoke` command emulate the AWS Lambda environment?
Open an interactive chat with Bash
What is the difference between `sam local invoke` and `sam local start-api`?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .