What should the developer do to meet these requirements?
Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam sync command to deploy the incremental changes.
Use the AWS Serverless Application Model (AWS SAM) to build the application. Use the sam init command to deploy the incremental changes.
Use the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk synth command to deploy the incremental changes.
Use the AWS Cloud Development Kit (AWS CDK) to build the application. Use the cdk bootstrap command to deploy the incremental changes.
Explanations:
The AWS Serverless Application Model (AWS SAM) provides a command calledsam sync, which allows for incremental deployments of changes made to the application without redeploying the entire stack. This command detects file changes and updates only the necessary resources, facilitating a faster development workflow.
Thesam initcommand is used to create a new SAM application project and does not deploy any changes. It is not suitable for deploying incremental changes after code commits, as its primary function is to initialize a new project rather than to update existing deployments.
Thecdk synthcommand generates CloudFormation templates from the AWS CDK code but does not deploy any changes. It is used for synthesizing the infrastructure as code but does not provide a mechanism for incremental deployment. Therefore, it does not meet the requirement for deploying incremental changes to AWS.
Thecdk bootstrapcommand is used to set up resources needed by the AWS CDK to deploy applications, such as creating an S3 bucket for assets. It does not deploy application changes or facilitate incremental updates, making it unsuitable for the developer’s requirements.