Question #813
A DevOps engineer is configuring a continuous integration and delivery (CI/CD) pipeline for a serverless application on AWS. The engineer needs to ensure that each code commit triggers a deployment of only the modified components without redeploying the entire application infrastructure. The solution must optimize deployment speed and reduce resource consumption during incremental updates.
What should the engineer implement to meet these requirements?
Use the AWS Serverless Application Model (AWS SAM) to develop the application. Configure the pipeline to execute the SAM sync command for deploying incremental changes.
Use the AWS Serverless Application Model (AWS SAM) to develop the application. Configure the pipeline to execute the SAM init command for deploying incremental changes.
Use the AWS Cloud Development Kit (AWS CDK) to develop the application. Configure the pipeline to execute the CDK synth command for deploying incremental changes.
Use the AWS Cloud Development Kit (AWS CDK) to develop the application. Configure the pipeline to execute the CDK bootstrap command for deploying incremental changes.
Explanation
Answer A is correct because the AWS SAM 'sam sync' command is specifically designed to synchronize local changes to AWS, deploying only the modified components of a serverless application. This avoids redeploying the entire infrastructure, reducing deployment time and resource consumption.
Option B is incorrect because 'sam init' initializes a new SAM project and does not handle deployments. Option C is incorrect because 'cdk synth' generates a CloudFormation template but does not deploy changes. Option D is incorrect because 'cdk bootstrap' sets up the CDK environment and is unrelated to incremental deployments. Key points: Use AWS SAM's 'sam sync' for efficient incremental deployments in CI/CD pipelines for serverless applications.
Answer
The correct answer is: A