We have a system set up that when we merge a branch into master, it runs in AWS CodePipeline where it recognizes the merge, builds the code to our QA environment, then waits for approval to be deployed to production.

The issue is that once we make that first merge into master we are gatekept from releasing anything in production until everything is tested.

Is there a way to have a process in AWS CodePipeline where it can recognize a new branch has been pushed to Git, something like a %Release% branch, that can be picked up and deployed to QA only, so in case we need to run a hot fix to production we can do that with out worrying about untested changes in QA?

My thought was creating a new pipeline that we call qa-testing-pipeline along side of our main-pipeline, then that pipeline only build and deploy to qa. This would mean that if we needed to build something to master, we could do that, and run our main-pipeline deployment which would deploy to QA, overwriting the existing build, then on approval go to production.

For this image, the QA Environment is the same in both pipelines. We would just like something that doesn't gate keep us from a hotfix until the current release is ready.

enter image description here

1 Answer 1


If using AWS CodeCommit, you can create an event in AWS event bus that can trigger the CodeBuild/CodePipeline:

  "source": ["aws.codecommit"],
  "detail-type": ["CodeCommit Repository State Change"],
  "detail": {
    "event": ["CreateBranch"],
    "referenceName": [{
      "prefix": "release/"

I'm pretty sure the same can be done also using Github/Bitbucket webhooks

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.