Skip to content

Sample code for creating a serverless multi-account deployment pipeline with CodePipeline and CodeBuild

Notifications You must be signed in to change notification settings

davetownsend/serverless-multi-account-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-multi-account-deploy

Serverless multi-account deployments with CodePipeline & CodeBuild

pipeline

Running the demo

Step 1

Clone/fork repo

Create a Slack webhook (only required for the monitor-service)

Use the ssm.sh template to create the two required ssm params.

Note: the demo code uses String type params, in production code you may want to use SecuredString

Step 2 - Create pipeline stack

Create a new stack in CloudFormation using pipeline.yml

Step 3 - Create deployer role stack

Create a new stack in CloudFormation using deployer-role.yml

Step 4 - Deploy pipeline monitor-service (optional)

monitor

From the monitor-service directory:

Install node dependencies:

npm i

Using the Serverless Framework deploy the monitor-service

$(npm bin)/sls deploy

Deploy demo app with pipeline

Push new commit or force a release in the CodePipeline console.

If all is successful there will be two Slack message sent to the channel: One from CodeBuild (success status) and one from CodePipeline (approval stage notification).

Note: For ease of demo code, most IAM policies are not least privilege.

About

Sample code for creating a serverless multi-account deployment pipeline with CodePipeline and CodeBuild

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published