← AWS DevOps Engineer Professional: operations and delivery
09 / 24 · 75 MIN

Pipeline concurrency, gates, and recovery

Control which revision reaches the service and retain evidence when delivery is interrupted.

Distinguish execution from effect

In a fictional position-close service, two releases share one target. The newer release finishes first, but the older one writes afterward and restores older code. Looking only at commit order does not resolve the problem. Draw the path from source event to service effect: fetched revision, build inputs, produced artifact, validation, approval, and deployment operation. Record identifiers linking each step. A pipeline coordinates tasks, but participating services have their own states. During an incident, distinguish an execution that stopped advancing from an external task that can still finish or make changes. That distinction determines whether another intervention would conflict with live work.

Choose concurrency from requirements

SUPERSEDED lets a newer execution overtake one waiting between stages; it does not automatically cancel the action already occupying a stage. QUEUED preserves processing order, while PARALLEL allows independent executions. The choice depends on whether skipping intermediate revisions is acceptable and whether the target tolerates concurrency. A queue in one pipeline is not a global lock across every organizational pipeline. Check recovery limitations too: stage rollback is unavailable in PARALLEL. With CodeCommit in that mode, the triggering event may differ from HEAD fetched when the source action starts. A source revision override and verification of the effective revision make the content to process explicit.

Stop with known state

Stop and wait lets in-progress actions finish and prevents subsequent actions in that execution. Stop and abandon stops waiting for action completion but does not guarantee provider cancellation. If CloudFormation remains UPDATE_IN_PROGRESS, the team still has an operation to track. Retain events and change identity, control new starts against the same target, and assess cancellation or recovery through the service’s supported mechanism. Avoid describing Stopped as completed rollback. In committee or shift handover, present pipeline progress, provider state, and functional outcome separately. The next operator can then distinguish confirmed facts from state that can still change.

Preserve failure and evidence

A test gate must know the executed set and result rather than merely find a report file. If a filter reduces 240 cases to twelve, a 100% pass rate may no longer cover acceptance. Link results to the exact artifact. In CodeBuild, finally can collect diagnostics after failure; successful collection does not itself turn the failed phase into success. Review compute too: the inspected reference does not support on-failure on Lambda compute or reserved capacity. An execution-engine change requires recovery, permissions, and evidence capture to be revalidated instead of transferring configuration without checking its effect.

Check inputs and packaging

Effective variables can differ from the versioned file: the CodeBuild start request takes precedence over the project, which takes precedence over buildspec. Approval based only on the repository can therefore miss configuration used in execution. In buildspec 0.1, commands use separate shells; version 0.2 preserves context across commands. Treat this as execution semantics. Inspect packaging too: discard-paths set to yes removes artifact directory structure. If the service expects config/app.yml, a flattened file is not equivalent. Test the unit that will be promoted with identified configuration, avoiding the assumption that successful compilation proves correct installation.

Exercise the promotion decision

The local model compares approved and produced identity and checks whether required tests belong to the passed set. In the example, unit and duplicate-effect are required; a run reporting only unit is rejected even without failures. The code neither calls AWS nor replaces a real gate: authorization, result integrity, and concurrency control are absent. Use it to discuss the contract before implementation. For stage rollback, confirm eligible prior success in the current structure version and validate older code against current data. Operational completion combines artifact, state, and functional evidence; no single indicator establishes all three.

def promotion_allowed(approved_digest, built_digest, required, passed):
 return approved_digest == built_digest and required <= passed

required = {'unit', 'duplicate-effect'}
assert not promotion_allowed('r17', 'r17', required, {'unit'})
assert not promotion_allowed('r17', 'r18', required, required)
assert promotion_allowed('r17', 'r17', required, required)
# Original local model; no AWS calls, authorization, signature validation or concurrency control.
IN PRACTICE

Fictional case: a worker passes twelve tests, but the filter omitted business-required safe retries; the gate remains pending.

Common pitfalls

Confusing Stopped with external cancellation, pass percentage with coverage, event with effective revision, and stage rollback with data reversal.

Related topics: CloudFormation retention and state recovery

Take this idea with you

Before promoting or retrying, confirm revision, validated set, and state of operations that can still change the target.

Create account

Reference: CodePipeline execution semantics · DOP-C02

AWS is a trademark of Amazon.com, Inc. or its affiliates. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by AWS. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.