Skip to content

Sample project that shows how a set of bash scripts can be used to implement a continuous deployment pipeline for an AWS Lambda function that act as a backend for an AWS API Gateway configured by AWS CloudFormation.

License

Notifications You must be signed in to change notification settings

Cloud-DevOps-Labs/api-gateway-continuous-deployment

 
 

Repository files navigation

Continuous Deployment for AWS Lambda behind API Gateway

Sample project that shows how a set of bash scripts can be used to implement a continuous deployment pipeline for an AWS Lambda function that act as a backend for an AWS API Gateway configured by AWS CloudFormation.

Please read the blog post for details.

CloudFormation Template

cloudformation.template

Tools

In order to execute the scripts, you need to install the following tools:

  • AWS CLI (AWS Command Line Interface)
  • npm (JavaScript package manager)
  • jq (JSON Command Line Processor)

Scripts

Script Description
0-create-stack.sh Creates the stack
1-test.sh Executes unit tests
2-package.sh Creates .zip
3-update-lambda.sh Updates Lambda
4-lambda-itest.sh Executes Lambda integration tests
5-publish-version.sh Publishes Lambda version
6-update-stage-alias.sh Update stage alias
7-api-gateway-itest.sh Executes API Gateway integration tests
8-update-prod-alias.sh Update prod alias
build-and-deploy-to-stage.sh Build pipeline script
update-alias.sh Support script used by other scripts

Update

On the November 18th, 2016 AWS introduced the Serverless Application Model (or SAM for short) that provides an alternative solution to the one described in this blog post. Please read the AWS blog post and study the related project at the AWS Labs GitHub account for more information.

About

Sample project that shows how a set of bash scripts can be used to implement a continuous deployment pipeline for an AWS Lambda function that act as a backend for an AWS API Gateway configured by AWS CloudFormation.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 56.9%
  • JavaScript 43.1%