DEV Community

Cover image for Using AWS CodePipeline to deploy on different environments

Using AWS CodePipeline to deploy on different environments

AWS CodePipline is a service used to release and deploy changes to different environments in a visualize way, It’s used to orchestrate your deployment from AWS CodeCommit till deploying these changes using AWS CodeDeploy.

In this article we will demonstrate how to use AWS CodePipeline to orchestrate the deployment to dev environments and make use of the manual approval process to deploy on prod environments.

I built a high-level design to have visual on how this will work

Image description

Deployment steps

1- go to AWS CodePipeline service through AWS console and create pipeline

Image description

2- Enter the below settings for the pipeline

Image description

3- I used AWS CodeCommit as a source with a sample nodejs code uploaded & press next

Image description

4- Create a stage for deployment with the below configuration & create the pipeline

Image description

5- Add Another stage for the production environment after the first deployment stage with the below action and these will contain two action groups ( manual approval & deploy to production environment )

Image description

Image description

You can create and define SNS topic for sending notification in case of any pending approvals.

Image description

the deploy to production environment will look like the above screenshot.

6- Since AWS CodeCommit is integrated with the pipeline, any modification in the branch defined in the AWS CodeCommit configuration will trigger the pipeline

Image description

Image description

Image description

So it’s good way to release the code in testing environment first then an approval process before releasing it into production environment.

Top comments (1)

Collapse
 
prasadkpd profile image
Prasad Lakshan

Thanks for sharing