2. Add Manual Approval

In this lab we will add a manual approval step before deployment to ensure operational visibiliy.

Create an SNS Topic and Subscription

  • Open the Amazon SNS console
  • In the navigation pane, choose Topics
  • Select Create new topic
  • Topic Name CICD-Approval
  • Display Name CD Approve
  • Select the Topic from the list and click on Create Subscription
  • Select Email and enter an email address that you can access during the labs
  • You will recvieve an email, click on Confirm Subscription ton activate the topic

Add the IAM Permissions

We need to modify the Role associated with CodePipeline to give access to SNS

  • Sign in to the AWS Management Console and open the AWS IAM console
  • Under roles, locate the Nested ECS-Deployment Stack called “ECS-ContinuousDeployment-D-CodePipelineServiceRole-XXXX”
  • Click on Attach policies
  • In the filer policies search for AmazonSNSFullAccess and attach it

Add Manual Approval to the Pipeline

  • Sign in to the AWS Management Console and open the AWS CodePipeline console
  • Select ``ECS-ContinuousDeployment-DeploymentPipeline-XXXX```
  • Click on Edit and nagivate to Build and after that stage click on Add Stage
  • Give the stage a name Approval
  • Click on Add action Group and fill in the details
  • Action Name Operational Approval
  • Action Provider Manual Approval
  • SNS Topic ARN Select the SNS topic we created earlier
  • URL for Review https://github.com/yourusername/ecs-refarch-continuous-deployment/commits/master
  • click on Done and scroll to the top and Save

Test the Approval

  • Either click on release change on CodePipeline or change some values in the index.php in the GitHub Repo you will recieve a similar email as the one below

Click on the link and approve the change and watch the deployment