A developer uses AWS SAM for an application with API Gateway, Lambda, and DynamoDB. Currently when only Lambda code changes are pushed, the entire application artifacts are rebuilt. The developer wants to use AWS SAM Accelerate to redeploy only the changed Lambda functions by running a single command. Which command accomplishes this?
Choose an answer
Tap an option to check your answer.
Correct answer: sam sync --watch.
Why this is the answer
The sam sync --watch command is designed for rapid iterative development with AWS SAM. It monitors your local SAM project for changes and automatically syncs only the modified resources (like Lambda function code) to the AWS cloud. This significantly speeds up the development cycle by avoiding full application redeployments. sam deploy --force-upload forces the upload of artifacts even if they haven't changed, but it still performs a full deployment. sam deploy --no-execute-changeset creates a CloudFormation changeset but doesn't execute it, which is not for deployment. sam package prepares your application for deployment by zipping artifacts and uploading them to S3, but it doesn't deploy them.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed