3

My pipeline has a few "static" resources (a few CloudFormation stacks). If the pipeline is running on several source changes in parallel, it leads to errors. is there an option to queue AWS CodePipeline executions, maybe lock the pipeline for only 1 execution at a time?

1 Answer 1

4

Just put every action into one single stage. AWS CodePipeline limits stage executions to one by default.

Sign up to request clarification or add additional context in comments.

3 Comments

I believe I did'nt explain my case good enough.Imagine a pipeline that creates dynamically CloudFormation stack with a few resources (EC2, Lambda, whatever). At the end of the pipeline this stack is deleted. If the same pipeline is triggered twice, there will be a race condition on this resources.
Understood. But my answer remains the same. Stages would be 1) Source 2) Job. In 2) you are doing a) creating your stacks b) do whatever you want to do c) delete all stacks
In this scenario the execution#2 would fail because it will try to create a stack with resources that already exist in another stack (stack from execution#1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.