A company uses AWS CodePipeline with a manual approval step before deployment. The developer wants to ensure that if a pipeline execution is waiting for approval and new code is pushed, the awaiting execution is canceled and a new one starts with the latest code. Which pipeline execution mode should be configured?
Trap 1: Queued
In Queued mode, if a new source change is detected while a pipeline execution is already in progress, the new execution will be placed in a queue. It will only begin processing once the currently running execution has successfully completed or failed. This mode ensures sequential processing of changes but does not cancel any existing execution, meaning the manual approval for the initial execution would still be pending and relevant until that execution finishes.
Trap 2: Parallel
In Parallel execution mode, AWS CodePipeline allows multiple pipeline executions to run concurrently, each triggered by a new source change. If a new change arrives while an execution is awaiting manual approval, a new, separate execution will start without canceling the previous one. This could lead to multiple pending approvals for different code versions or potentially deploying an older version if its approval is granted after a newer version has already started processing.
Trap 3: Single
'Single' is not a recognized or configurable execution mode within AWS CodePipeline. Pipeline execution modes are limited to 'Queued', 'Superseded', and 'Parallel', which define how the pipeline handles new source revisions when an execution is already active. Therefore, selecting 'Single' as an execution mode is not a valid option for managing pipeline behavior.
- A
Queued
Why it fails: In Queued mode, if a new source change is detected while a pipeline execution is already in progress, the new execution will be placed in a queue. It will only begin processing once the currently running execution has successfully completed or failed. This mode ensures sequential processing of changes but does not cancel any existing execution, meaning the manual approval for the initial execution would still be pending and relevant until that execution finishes.
- B
Superseded
The Superseded execution mode is designed to prioritize the latest changes by canceling any currently running pipeline execution when a new source revision is detected. This ensures that the manual approval step, if present, will always apply to the most recent code changes, preventing the deployment of outdated versions. A new pipeline execution is then immediately initiated with the latest code, requiring a fresh approval for the most current state.
- C
Parallel
Why it fails: In Parallel execution mode, AWS CodePipeline allows multiple pipeline executions to run concurrently, each triggered by a new source change. If a new change arrives while an execution is awaiting manual approval, a new, separate execution will start without canceling the previous one. This could lead to multiple pending approvals for different code versions or potentially deploying an older version if its approval is granted after a newer version has already started processing.
- D
Single
Why it fails: 'Single' is not a recognized or configurable execution mode within AWS CodePipeline. Pipeline execution modes are limited to 'Queued', 'Superseded', and 'Parallel', which define how the pipeline handles new source revisions when an execution is already active. Therefore, selecting 'Single' as an execution mode is not a valid option for managing pipeline behavior.