ca-archived / codepipeline-multi-manual-approvals

Serverless application that enable multiple manual approvals on AWS CodePipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS CodePipeline multiple manual approvals

Overview

Serverless application that enable multiple manual approvals on AWS CodePipeline. About AWS CodePipeline manual approval.

Many thanks to Forrest Brazeal for brilliant idea: Enforcing the 'Two-Person Rule' with AWS CodePipeline.

Prerequisites

Launch by AWS SAR

The simplest way to launch this application in your account is using Serverless Application Repository.

Launch now

Setup AWS CodePipeline

AWS CodePipeline supports AWS Lambda function invoking action. You should setup a multiple approvals as follows:

  1. Add a manual approvals stage

  2. Add an action group with multiple manual approval actions

  3. Add an ApprovalChecker action group below manual approval action group, that invokes the lambda function.

Note that, you MUST provide User parameters in following format: {"codepipelinename":"YOUR PIPELINE NAME","approvalstagename":"YOUR MANUAL APPROVAL STAGE NAME AT STEP 1"}. So, your could use same function for handler multiple pipelines with difference User Parameters.

For examples:

  • Assume that your pipeline's name is ExamplePipeline

  • Create a multiple approvals stage with 2 manual approval actions:

create-multiple-approvals-stage.jpg
Multiple approvals stage that named: Approvals
  • ApprovalChecker action setting is as follows:
create-approval-checker-action.jpg
ApprovalChecker action's setting
  • The User parameters is {"codepipelinename":"ExamplePipeline","approvalstagename":"Approvals"}

TODOs

  • Public on Serverless Application Repository in Tokyo region (Please, AWS 🙏)
  • Run locally without real AWS CodePipeline setup

Contributing

Please, create a pull request and assign to me, I will check as soon as possible.

About

Serverless application that enable multiple manual approvals on AWS CodePipeline

License:MIT License


Languages

Language:JavaScript 78.5%Language:Makefile 13.9%Language:Shell 7.6%