How to deploy incremental changes in AWS serverless applications?

A developer is building a serverless application that runs on AWS. The developer wants to create an accelerated development workflow that deploys incremental changes to AWS for testing. The developer wants to deploy the incremental changes but does not want to fully deploy the entire application to AWS for every code commit. What should the developer do to meet these requirements?

  1. Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam sync command to deploy the incremental changes. Source Reference Answer
  2. Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam init command to deploy the incremental changes.
  3. Use the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk synth command to deploy the incremental changes.
  4. Use the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk bootstrap command to deploy the incremental changes.

Community Votes

A
100%

100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests knowledge of AWS SAM Accelerate features, specifically distinguishing between commands that deploy changes versus commands that only generate templates or initialize projects.

AWS SAM Accelerate's sam sync command enables rapid incremental deployments of serverless applications to AWS without redeploying the entire stack, making it the ideal choice for accelerated development workflows.

Candidates often confuse `cdk synth` as a deployment command, but it only generates CloudFormation templates without actually deploying resources to AWS.

Community Discussion (5 comments)

tgv 👍 6 Selected: A
Here the answer is A - sam sync. According to my research: - cdk synth: only constructs your CloudFormation template. It does not deploy (create actual resources) it to AWS. You can take the template constructed, deploy it manually in CFN console, edit or inspect. - sam init: used to initialize a new serverless application - cdk bootstrap: the main purpose of cdk bootstrap is to provision a set of resources required to support the deployment of AWS CDK applications
65703c1 👍 2 Selected: A
A is the correct answer.
KarBiswa 👍 2 Selected: A
https://aws.amazon.com/blogs/compute/speeding-up-incremental-changes-with-aws-sam-accelerate-and-nested-stacks/#:~:text=AWS%20SAM%20Accelerate%20enhances%20the%20development%20experience.%20It%20automatically%20observes%20local%20code%20changes%20and%20synchronizes%20them%20to%20AWS%20without%20building%20and%20deploying%20every%20function%20in%20my%20project.
ANDRES715 👍 1 Selected: A
You.com
CrescentShared 👍 1 Selected: A
Serverless cdk synth command is not used for deploying changes. Instead, cdk synth generates an AWS CloudFormation template from the CDK app's code, which describes the cloud resources that need to be created or updated. It does not actually deploy those changes to AWS.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Understanding AWS SAM Accelerate

The question requires deploying incremental changes to AWS for testing without fully deploying the entire application on every code commit. This is precisely what AWS SAM Accelerate provides through the sam sync command.

Why Option A is Correct

The sam sync command is part of AWS SAM Accelerate, which automatically observes local code changes and synchronizes them to AWS without building and deploying every function in the project. This dramatically speeds up the development workflow by:

  • Detecting only changed resources and deploying those specific changes
  • Skipping unchanged functions in the deployment process
  • Providing near real-time synchronization between local development and AWS

Why Other Options Are Wrong

Option B (sam init): This command initializes a new SAM application from a template. It creates the project structure but has nothing to do with deploying incremental changes.

Option C (cdk synth): As community members correctly noted, cdk synth only generates the CloudFormation template from CDK code. It does not deploy anything to AWS. You would need cdk deploy to actually provision resources.

Option D (cdk bootstrap): This command provisions the initial infrastructure (S3 buckets, IAM roles) needed to deploy CDK applications. It's a one-time setup operation, not a deployment command for incremental changes.

Key Takeaway

For accelerated serverless development workflows requiring incremental deployments, sam sync is the purpose-built solution that meets the requirement of deploying only changed components without full stack redeployment.

Official Reference

Exam Strategy

When you see 'incremental changes' and 'accelerated development workflow' in serverless questions, immediately think SAM Accelerate and sam sync. Eliminate CDK options that mention synth or bootstrap as they don't deploy changes.

Related Analysis

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide