# AWS Step Functions: the Deployment Orchestrator that CodePipeline should have been

**URL:** <https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599>\
**Category:** Monitoring & DevOps\
**Tags:** codepipeline, step-functions\
**Created:** [March 22, 2021, 1:02pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599 "2021-03-22T13:02:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Donkersgoed](https://awshq.com/letter_avatar_proxy/v4/letter/d/c67d28/32.png) [@Donkersgoed](https://awshq.com/u/Donkersgoed)\
**Post date:** [March 22, 2021, 1:02pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/1 "2021-03-22T13:02:24Z")

</div>

AWS Step Functions: the Deployment Orchestrator that CodePipeline should have been

> **[Sentia Tech Blog](https://sentiatechblog.com)**
>
> Sentiatechblog.com offers expert insights on AI, software development, cloud infrastructure, and cybersecurity—designed for developers, engineers, and tech professionals.

* * *

**Related discussions:**

- [CDK Artifacts from local files](https://awshq.com/t/cdk-artifacts-from-local-files/16985)
- [Best practice serverless project with EventBridge EventBus implementation.](https://awshq.com/t/best-practice-serverless-project-with-eventbridge-eventbus-implementation/16165)
- [Build CI/CD for IAC](https://awshq.com/t/build-ci-cd-for-iac/19927)
- [what has been your experience using codebuild, codepipeline and codedeploy?](https://awshq.com/t/what-has-been-your-experience-using-codebuild-codepipeline-and-codedeploy/15377)
- [AWS in 2025; what’s your default stack (and why)?](https://awshq.com/t/aws-in-2025-what-s-your-default-stack-and-why/20743)

---

<div class="post-metadata">

**Author:** ![coinclink](https://awshq.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@coinclink](https://awshq.com/u/coinclink)\
**Post date:** [March 22, 2021, 2:51pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/2 "2021-03-22T14:51:59Z")

</div>

I think your issue of “Parallel builds” is solved by creating separate branches, but you list separate branches as another problem. I know other people don’t like this pattern, or expect a different pattern from their pipeline, but I do like this. What I mean is, I like that each branch gets an entirely separate pipeline and build process. If you design around that concept, you don’t have to worry about any of the problems you mentioned.

I put the deployment in the hands of whatever developers are working on that branch. Ideally, they can deploy the entire pipeline themselves in their own dev AWS account from only the code that’s in the branch. Worst case, I have to get it set up for them, but then they’re on their own and can edit anything they want via pushes to git, right down to the pipeline itself (although I’d probably discourage that).

I do like the idea of the conditional branching you added. At the same time, I think that looks very complex and (perhaps) hard to manage. CodePipeline is straightforward steps that take place. You can also trigger a State Machine directly from CodePipeline too, if needed.

---

<div class="post-metadata">

**Author:** ![ABetterNameEludesMe](https://awshq.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@ABetterNameEludesMe](https://awshq.com/u/ABetterNameEludesMe)\
**Post date:** [March 23, 2021, 12:05am UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/3 "2021-03-23T00:05:47Z")

</div>

> CodePipeline a complex system, but most of all it is _opinionated_.

I think the author is being nice. Being opinionated is not an excuse for no dynamic branch or conditional execution support. 😉

That said, it seems to me a little bit reinventing-the-wheel to implement build pipelines using Step Functions. What’s wrong with a Jenkins or TeamCity cluster on EC2 which would support all those missing features out of the box?

---

<div class="post-metadata">

**Author:** ![investorhalp](https://awshq.com/letter_avatar_proxy/v4/letter/i/7ba0ec/32.png) [@investorhalp](https://awshq.com/u/investorhalp)\
**Post date:** [March 23, 2021, 12:17am UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/4 "2021-03-23T00:17:37Z")

</div>

> [@ABetterNameEludesMe](#):
>
> I think the author is being nice. Being opinionated is not an excuse for no dynamic branch or conditional execution support. 😉 That said, it seems to me a little bit reinventing-the-wheel to implement build pipelines …

+1 These are “not cloud” so we are “forced” to sell the cloud. Stupid cloud ruined the cloud.

---

<div class="post-metadata">

**Author:** ![Scarface74](https://awshq.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@Scarface74](https://awshq.com/u/Scarface74)\
**Post date:** [March 23, 2021, 1:06am UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/5 "2021-03-23T01:06:16Z")

</div>

> [@ABetterNameEludesMe](#):
>
> I think the author is being nice. Being opinionated is not an excuse for no dynamic branch or conditional execution support. 😉 That said, it seems to me a little bit reinventing-the-wheel to implement build pipelines …

I’m not making excuses for it not being built in, but it is rather easy to do with Lambda.

[https://aws.amazon.com/blogs/devops/adding-custom-logic-to-aws-codepipeline-with-aws-lambda-and-amazon-cloudwatch-events/](https://aws.amazon.com/blogs/devops/adding-custom-logic-to-aws-codepipeline-with-aws-lambda-and-amazon-cloudwatch-events/)

Well maybe not _easy_. But I have done it.

---

<div class="post-metadata">

**Author:** ![coinclink](https://awshq.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@coinclink](https://awshq.com/u/coinclink)\
**Post date:** [March 23, 2021, 3:53pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/6 "2021-03-23T15:53:35Z")

</div>

> [@ABetterNameEludesMe](#):
>
> I think the author is being nice. Being opinionated is not an excuse for no dynamic branch or conditional execution support. 😉 That said, it seems to me a little bit reinventing-the-wheel to implement build pipelines …

What advantage does dynamic branching give you over just deploying a new pipeline when a new branch is added?

---

<div class="post-metadata">

**Author:** ![ABetterNameEludesMe](https://awshq.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@ABetterNameEludesMe](https://awshq.com/u/ABetterNameEludesMe)\
**Post date:** [March 23, 2021, 4:44pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/7 "2021-03-23T16:44:21Z")

</div>

> [@coinclink](#):
>
> What advantage does dynamic branching give you over just deploying a new pipeline when a new branch is added?

Well, how about you are charged by the number of active pipelines to boot? 🙂

Not specifically to CodePipeline, the problem with one pipeline per branch is when you need to change something in the pipeline config, you’d have to change all the pipelines - think about all the feature/\* and release/\* branches. Sure you could have it scripted but it’ll still be pretty disruptive if your script catches a running pipeline.

---

<div class="post-metadata">

**Author:** ![coinclink](https://awshq.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@coinclink](https://awshq.com/u/coinclink)\
**Post date:** [March 23, 2021, 4:49pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/8 "2021-03-23T16:49:34Z")

</div>

> [@ABetterNameEludesMe](#):
>
> Well, how about you are charged by the number of active pipelines to boot? 🙂 Not specifically to CodePipeline, the problem with one pipeline per branch is when you need to change something in the pipeline config, …

Well, $1/mo per _active_ branch is not really that much, running Jenkins would probably cost more - and yes, it is a little disruptive to change the pipeline and then merge to another branch. I rarely ever have to do that though, and most times CodePipeline handles changes fine, it just changes the pipeline and then executes again. Unless you’re making huge changes, but i wouldn’t say it’s any _more_ work than making major changes to a build pipeline on some other platform.

---

<div class="post-metadata">

**Author:** ![ABetterNameEludesMe](https://awshq.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@ABetterNameEludesMe](https://awshq.com/u/ABetterNameEludesMe)\
**Post date:** [March 23, 2021, 4:59pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/9 "2021-03-23T16:59:13Z")

</div>

> [@coinclink](#):
>
> Well, $1/mo per _active_ branch is not really that much, running Jenkins would probably cost more - and yes, it is a little disruptive to change the pipeline and then merge to another branch. I rarely ever have to do …

Yeah, of course those are not blocking issues and people manage to find decent workaround or at least live with them. But the question is still, why? I mean, it’s something incredibly easy to support. Just make the CodeCommit source action support properties. Build actions already support them.

It actually just occurred to me that maybe this is intentional _because of_ the pricing model. //shrug

---

<div class="post-metadata">

**Author:** ![coinclink](https://awshq.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@coinclink](https://awshq.com/u/coinclink)\
**Post date:** [March 23, 2021, 7:09pm UTC](https://awshq.com/t/aws-step-functions-the-deployment-orchestrator-that-codepipeline-should-have-been/12599/10 "2021-03-23T19:09:10Z")

</div>

> [@ABetterNameEludesMe](#):
>
> Yeah, of course those are not blocking issues and people manage to find decent workaround or at least live with them. But the question is still, why? I mean, it’s something incredibly easy to support. Just make the …

I guess I don’t see it is a “workaround” or “living with something” or some mad scheme to scrape an extra $2/mo out of customers. Rather, I see it as working exactly as it’s designed. I can respect that you probably work with other pipeline technologies that do what you’re looking for.

Having separate pipelines per branch allow me to incorporate all the code needed to deploy the entire app as one set of scripts and a single template. Each branch can be independently deployed, pipeline and all, with no information from any other branch or some central pipeline.

With your design, you would have a central pipeline that manages all the environments. That pipeline would be a completely separate item to manage and would probably live completely separately from the git repo itself.

Both are valid methods, I just want to point out to you that CodePipeline _does_ work exactly as it’s designed to work, it’s just generally a different deployment strategy than people are used to with tools like Jenkins.

There are a lot of customer requests for something more similar to what you are talking about though. I have a feeling you’d be happier with the new Proton service.
