A developer is maintaining a continuous delivery pipeline in AWS CodePipeline that consists of Source, Build, and Deploy stages. The Deploy stage uses AWS CodeDeploy to release updates to an Amazon ECS service. The developer needs to temporarily prevent new builds from being deployed to ECS while the production database undergoes a scheduled maintenance window. However, developers must still be able to commit code changes, and the pipeline must continue to run the Source and Build stages to validate the builds. Which configuration change should the developer make to achieve this goal with the least administrative effort?
- AModify the trust policy of the CodePipeline service role to remove the AssumeRole permission for the CodeDeploy service principal.
- BConfigure the AWS Systems Manager Parameter Store with a boolean flag, and update the ECS task definition to retrieve this parameter and abort the container startup during maintenance.
- Disable the transition from the Build stage to the Deploy stage in the CodePipeline console.Cevap
- DModify the ECS Task Execution Role to temporarily remove permission to pull the container image from Amazon ECR.
Cevap
Disable the transition from the Build stage to the Deploy stage in the CodePipeline console.
Disabling the transition between stages in AWS CodePipeline prevents new executions from entering the target stage (Deploy) while allowing preceding stages (Source, Build) to complete successfully. The pipeline execution stops at the boundary, and once the maintenance is complete, the transition can be re-enabled to allow the latest build artifact to progress to the Deploy stage automatically.
Adım Adım Çözüm
Anahtar Kavram
AWS CodePipeline Stage Transitions