AWS Certified Developer – Associate (DVA-C02)DeploymentMedium
A developer is configuring an AWS CodePipeline to deploy a serverless application consisting of AWS Lambda functions, Amazon API Gateway, and Amazon DynamoDB tables. The pipeline needs to automatically create and manage these resources. Which type of deployment action should be used in the deployment stage of the CodePipeline?
- AAmazon S3 deployment
- BAWS CodeDeploy deployment
- CAWS CloudFormation stack update
- DAWS Elastic Beanstalk deployment
Show answer & explanationAnswer & explanation
Correct answer: C. AWS CloudFormation stack update
For serverless applications defined using Infrastructure as Code (like AWS SAM or raw CloudFormation), the deployment involves creating or updating a CloudFormation stack. CodePipeline's CloudFormation action type is specifically designed to manage these stack operations, ensuring all resources are provisioned and updated consistently.
Why the other options are wrong
- A. S3 deployment is typically for static website content and doesn't manage serverless compute or database resources.
- B. CodeDeploy is used for deploying application revisions to existing compute services (EC2, ECS, Lambda), not for provisioning the underlying infrastructure like API Gateway or DynamoDB.
- D. Elastic Beanstalk is for deploying web applications, often with EC2, and doesn't directly manage individual serverless components like Lambda and DynamoDB as a primary deployment mechanism.
CodePipeline CloudFormation Action
An action type in AWS CodePipeline used to create, update, or delete AWS CloudFormation stacks, managing the deployment of infrastructure as code.
- Manages CloudFormation stack lifecycle.
- Ideal for deploying serverless applications (SAM templates).
- Ensures consistent resource provisioning.
Memory trick: CloudFormation stacks, for serverless attacks, CodePipeline tracks.