Mohamed Heiba
Mohamed Heiba

Reputation: 1833

How can I setup manual approval to proceed in AWS CodePipeline

I wish to create the following AWS CodePipeline process

  1. Developers push code to GitHub
  2. CodeDeploy deploys code to Test environment EC2
  3. Test engineer tests the web app on EC2
  4. Test engineer manually approves this revision
  5. CodeDeploy deploys code to Live environment EC2

My problem is in step 4 and 5, how can I make the codepipeline wait for manual approval (step 4) and then if approved, automatically proceeds to deploying next stage (step 5)

Thanks

Upvotes: 3

Views: 4011

Answers (1)

Eric Nord
Eric Nord

Reputation: 4885

To address your problem with Step 4 and 5 this can be accomplished 2 ways:

1) AWS has added the ability to add a manual approval step via the console: https://aws.amazon.com/about-aws/whats-new/2016/07/aws-codepipeline-adds-manual-approval-actions/

  • Open existing CodePipeline
  • Edit CodePipeline
  • Select the pencil icon enter image description hereon the Stage you want the Manual approval in
  • Click enter image description here then add this type of action:

enter image description here

2) ManualApproval can also be added to a CodePipeline CloudFormation Template Action like this:

- InputArtifacts: []
      Name: !Join ["",[!Ref GitHubRepository, "-prd-approval"]]
      ActionTypeId:
        Category: Approval
        Owner: AWS
        Version: '1'
        Provider: Manual
      OutputArtifacts: []
      Configuration:
        NotificationArn: !Ref ManualApprovalNotification
        ExternalEntityLink: OutputTestUrl
      RunOrder: 3

Upvotes: 2

Related Questions