Rollback using CodePipeline


We can see the history now in CodePipeline. But what is the best way to rollback to or re-execute a pipeline from the history?

asked 5 years ago631 views
6 Answers


At this time there is no way to perform a rollback or re-execution from the CodePipeline History. While this is an active feature request for this, we recommend watch the What's New Blog[1] or announcements about CodePipeline Feature Releases.


answered 4 years ago

Two years on, still no sign of a rollback feature on the horizon. I mean, I would have thought being able to rollback is a fundamental part any pipeline tool; at least, any pipeline tool that wants to be taken seriously. Frankly the absence of this fundamental feature in 2020 still baffles me. What exactly is the thinking behind this?
My team was considering switching to CodePipeline and this is a very serious downside for us, and I don’t think we’ll be going ahead with CodePipeline because of the lack of this essential feature.

answered 3 years ago

I totally agree. It's a crucial functionality and it shouldn't be complex to implement by the pipeline team.

answered 2 years ago

I literally have been pushing our company to get off Jenkins and onto CodeBuild/CodePipeline.

I can't believe there is no rollback. Why not have a list of artifact (triggers) and allow a redeploy of an older one? No need to mess with any other aspects of the pipeline, just re-run an older trigger? Next commit/build still triggers off a deployment as usual.. seems easy to implement.

I keep hearing "use code deploy if you want rollbacks" but in our case, we use ECS FARGATE and the only CodeDeploy action is this blue/green, which has another major limitation. It only allows 1 targetgroup + listener combo. We have a 443 listener as our gateway, and then an 8080 listener with host header rules to point to different target groups, guess what, it can't handle the rules. So that basically removes CodeDeploy as an option, which means there is no rollback, and therefore AWS CI/CD tools aren't able to work for us.


answered 2 years ago

This is a really surprising gap to run into with CodePipelines. CodeDeploy rollbacks are insufficient, as infra changes like IAM policy updates can cause issues sometimes and need rolling back. We really need to be able to rollback CFN updates. Even if the implementation is a roll-forward of a historical pipeline build artifact, that's fine.

answered a year ago

This is a bit of a ugly workaround, but what we do the following.

CodeCommit repo - used by the CodePipeline BitBucket repo - used by all developers daily

For deployment, we push all changes from the BitBucket repo into the CodeCommit repo (git mirror). This triggers the CI/CD and deployment goes on as expected.

Rollback: we reset the AWS CodeCommit repo (BitBucket repo remains untouched and developers can focus on fixing the cause which lead to the rollback in the first place) to a prev commit which does a new build and deploy but to a previous version of the code

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions