DEV Community

Latchu@DevOps
Latchu@DevOps

Posted on

πŸ€– AWS CodePipeline Execution Modes Explained β€” Queued vs Superseded vs Parallel (with Examples)

When working with AWS CodePipeline, it's important to understand how it handles multiple executions of the same pipeline. Let's break down the three execution modes with real-world examples to make them easier to understand.

🧠 What Are Execution Modes?

Execution modes determine how CodePipeline handles a new execution when a previous one is still in progress.

There are three modes:

  • Queued
  • Superseded
  • Parallel

1️⃣ Queued Execution Mode

πŸ“Œ Behavior:

If the pipeline is already running and a new revision (commit) is detected, CodePipeline queues the new execution and waits for the current one to finish.

πŸ“¦ Example:

  • You commit v1 β†’ Pipeline starts running
  • While v1 is deploying, you commit v2
  • v2 waits until v1 finishes
  • After v1 completes, v2 starts executing

πŸ§ͺ Use Case: You want every revision to go through the full pipeline without skipping anything.

2️⃣ Superseded Execution Mode

πŸ“Œ Behavior:

If a new revision comes in while another is still running, the current (older) one is stopped, and only the latest revision is executed.

πŸ“¦ Example:

  • You commit v1 β†’ Pipeline starts running
  • You quickly commit v2 and v3
  • v1 and v2 are canceled
  • Only v3 is executed

πŸ§ͺ Use Case: You only care about deploying the latest change, not every single revision.

3️⃣ Parallel Execution Mode

πŸ“Œ Behavior:

CodePipeline starts multiple executions at the same time, even if others are still running.

πŸ“¦ Example:

  • You commit v1, v2, and v3 quickly
  • All 3 versions go through the pipeline simultaneously

πŸ§ͺ Use Case: You’re running long-lived testing or deployments for each commit in isolation.

πŸ”„ Summary Table

Mode Older Execution Canceled? New Execution Starts Immediately? Use Case
Queued ❌ No ⏳ After current finishes Ensure every commit is tested
Superseded βœ… Yes βœ… Immediately Always deploy latest only
Parallel ❌ No βœ… Yes Run every commit in parallel

βš™οΈ How to Configure Execution Mode?

You can configure this when you define the source action in CodePipeline using GitHub, CodeCommit, or S3.

For example, in AWS Console:

  • Navigate to your pipeline
  • Edit the Source stage
  • Choose Change detection options
  • Set behavior: Queued, Superseded, or Parallel

πŸš€ Conclusion

Understanding how pipeline executions are handled helps you choose the best strategy for:

  • Faster deployments (Superseded)
  • Reliable testing (Queued)
  • High-throughput testing (Parallel)

Let me know in the comments how you handle CI/CD concurrency in your pipelines!

Top comments (0)