AWS Certified Developer – Associate — Question 338
A company is creating a continuous integration and continuous delivery (CI/CD) process by using AWS CodePipeline for its application on AWS. The CI/CD process will pull code from an AWS CodeCommit repository, create the application infrastructure by using AWS CloudFormation, deploy the frontend code to an Amazon S3 bucket that is configured for static website hosting, and deploy the application backend on an Amazon Elastic Container Service (Amazon ECS) cluster.
A developer needs to create a new CodePipeline stage that creates the application infrastructure.
Which solution will meet these requirements with the LEAST operational overhead?
Answer options
- A. Create a new action with AWS Lambda as the action provider. Create a Lambda function that makes an AWS SDK API call to create the CloudFormation stack.
- B. Create a new action with CloudFormation as the action provider. Set the action mode to CREATE_UPDATE. Target the CloudFormation stack to be launched.
- C. Create a new action with Jenkins as the action provider. Create and configure a Jenkins job to make an API call by using the AWS CLI to create the CloudFormation sack.
- D. Create a new action with AWS CodeBuild as the action provider. Configure the buildspec to make an API call by using the AWS CLI to create the CloudFormation stack.
Correct answer: B
Explanation
AWS CodePipeline natively integrates with AWS CloudFormation as a deploy action provider, allowing the direct creation or update of stacks without external code or servers. Using the CloudFormation action provider with the CREATE_UPDATE action mode minimizes operational overhead by avoiding the need to write and maintain custom scripts or manage external tools like AWS Lambda, AWS CodeBuild, or Jenkins. Therefore, Option B is the most efficient and native solution.