aws-samples / amazon-api-gateway-canary-deployment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Amazon API Gateway Canary Release Deployment

This stack creates an end to end implementation example to show how to do canary release deployment in Amazon API Gateway.

Services Used

Requirements for deployment

Deploying

In the terminal, use the SAM CLI guided deployment the first time you deploy. Go to pre-stack folder

sam deploy -g

Choose options

You can choose the default for all options

## The name of the CloudFormation stack
Stack Name [sam-app]:

## The region you want to deploy in
AWS Region [us-east-1]:

## The name of the application (lowercase no spaces). This must be globally unique
Parameter AppName [canary-deployment]:

## Enables public client and local client for testing. (Less secure)
Parameter UseLocalClient [false]:

## Shows you resources changes to be deployed and requires a 'Y' to initiate deploy
Confirm changes before deploy [y/N]: 

## SAM needs permission to be able to create roles to connect to the resources in your template
Allow SAM CLI IAM role creation [Y/n]:

## Save your choice for later deployments
Save arguments to samconfig.toml [Y/n]:

SAM will then deploy the AWS CloudFormation stack to your AWS account and provide required outputs for the included client. This will create DynamoDB table , Rest API and an IAM role to access the DynamoDB table.

After the first deploy you need to deploy the canary stack. Go to canary-stack folder and repeat the deployment using "sam deploy" same as above. Choose the default for all options

Cleanup

  1. Open the CloudFormation console
  2. Locate a stack named sam-app
  3. Select the radio option next to it
  4. Select Delete
  5. Select Delete stack to confirm

*Note: If you opted to have access logs (on by default), you may have to delete the S3 bucket manually.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

License:MIT No Attribution