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.
- nodejs8.10
- yarn
- aws-cli
- aws-sam-cli v0.11.0 or above
The simplest way to launch this application in your account is using Serverless Application Repository.
AWS CodePipeline supports AWS Lambda function invoking action. You should setup a multiple approvals as follows:
-
Add a manual approvals stage
-
Add an action group with multiple manual approval actions
-
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:
Multiple approvals stage that named: Approvals |
ApprovalChecker
action setting is as follows:
ApprovalChecker action's setting |
- The
User parameters
is{"codepipelinename":"ExamplePipeline","approvalstagename":"Approvals"}
- Public on Serverless Application Repository in Tokyo region (Please, AWS 🙏)
- Run locally without real AWS CodePipeline setup
Please, create a pull request and assign to me, I will check as soon as possible.