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
Just put every action into one single stage. AWS CodePipeline limits stage executions to one by default.
3 Comments
Fyodor Chernogorsky
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.
MaiKaY
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
Fyodor Chernogorsky
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)