How can i add approval stage in aws codepipeline?

programmer Source

I am new to aws services. We are having some ExpressJS Lambda projects created from CodeStar and are using default pipeline

(CodeCommit(source)-> CodeBuild(build&test)-> CloudFormation->(deployment)).

When we created project it deployed on Staging and Production. Now whenever we commit it does so. Now our problem is we need dev, qa, and production environment. At the moment we can manage with staging & prod. But I need a approval stage from staging to prod. But it auto deploys on both. I have searched a lot and visited many websites. But they only have diagrams showing CodeDeploy being used for deployment and in my case CodeFormation is being used. Didn't find some guide to integrate CodeDeploy.

I need help to maintain it from codecommit to stage to approval to prod.

Thanks

amazon-web-servicesaws-lambdaaws-codepipelineaws-codestar

Answers

answered 6 months ago colde #1

You could set it up like this:

CodeCommit(Source) -> CodeBuild(Build & Test) -> Cloudformation(Deployment to staging) -> Approval -> Cloudformation(Deployment to production)

That is exactly how i have it setup for a number of projects, although that is using Elastic Beanstalk for deployment. This pretty much ensures nothing can go directly to production without having been on staging first.

That would just require that you have a separate Cloudformation for staging and production deployment.

The approval step is one of the ones selectable in CodePipeline. You might want to set it up with an SNS topic, to get notifications when approval is needed.

comments powered by Disqus