An application team wants to automate the deployment of an AWS Serverless Application Model (SAM) project. The workflow requires compiling code, performing security tests, getting manual sign-off from a release manager, and updating a staging stack. The team sets up AWS CodePipeline to coordinate these actions. Arrange the sequence of operations in the correct order that occurs during a single execution of this pipeline, from the detection of a commit to the completion of the stack deployment.
- 1AWS CodePipeline detects a new commit in the source repository and archives the code to the pipeline's Amazon S3 artifact bucket.
- 2AWS CodeBuild runs the build specification to package the SAM application and uploads the output template artifact back to the S3 bucket.
- 3The pipeline transitions to an approval stage, suspends execution, and sends a notification to an Amazon SNS topic.
- 4After approval is given, the pipeline triggers an AWS CloudFormation deploy action to create a change set using the build stage's output artifact.
- 5The pipeline triggers another AWS CloudFormation action to execute the created change set and update the staging resources.
Answer
The correct sequence is: first, detecting the commit and archiving the source to the S3 artifact bucket; second, running CodeBuild to package the application and upload the output template; third, pausing for manual approval and notifying via SNS; fourth, creating the CloudFormation change set; and fifth, executing the change set to update the staging resources.
The correct execution flow starts with the source step where code is archived in S3. Next, CodeBuild generates the packaged template. Then, the execution pauses for manual approval. Finally, CloudFormation deploys the updates by first creating the change set and then executing it.
Step-by-Step Solution
Key Concept
AWS CodePipeline execution lifecycle, stage sequencing, and the separation of CloudFormation deployment steps into creating and executing change sets.