DVA-C02 · Question #270
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
The correct answer is A. Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam. The AWS SAM CLI sam sync command synchronizes local code and infrastructure changes incrementally to AWS, enabling rapid iterative testing without redeploying the entire application stack on every commit.
Question
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?
Options
- AUse the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam
- BUse the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam init
- CUse the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk synth
- DUse the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk bootstrap
How the community answered
(55 responses)- A78% (43)
- B2% (1)
- C7% (4)
- D13% (7)
Why each option
The AWS SAM CLI `sam sync` command synchronizes local code and infrastructure changes incrementally to AWS, enabling rapid iterative testing without redeploying the entire application stack on every commit.
The `sam sync` command (and its `--watch` mode) detects changes to Lambda function code and configuration, updating only the modified resources in the cloud. This provides a fast feedback loop for testing incremental changes without triggering a full CloudFormation deployment for each commit.
The `sam init` command scaffolds a new SAM project from a template; it does not deploy or sync changes to AWS and is a one-time project initialization command.
The `cdk synth` command synthesizes a CloudFormation template from CDK code locally but does not deploy or incrementally synchronize any resources to AWS.
The `cdk bootstrap` command provisions the CDK toolkit infrastructure (S3 bucket, IAM roles) required for CDK deployments in an account/region; it does not deploy application code or provide incremental updates.
Concept tested: AWS SAM CLI sam sync for incremental serverless deployments
Source: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli-sync.html
Community Discussion
No community discussion yet for this question.