sbstjn / cfn-release-example

Continuous Integration and Deployment for CloudFormation Templates using AWS CDK and GitHub Actions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish CloudFormation Templates with CDK

MIT License MIT License

Run Continuous Integration and Continuous Deployment with GitHub Actions for CloudFormation Templates and the AWS Cloud Development Kit. Use git tags to manage GitHub Releases and upload static YAML files to S3 for AWS integrations.

When orchestrating AWS services, you might end up needing a static CloudFormation Template stored in an S3 Bucket. The basic tools for CloudFormation Templates can be frustrating and building a pipeline to manage static files, is boring as hell. Thanks to the AWS Cloud Development Kit and GitHub Actions, you can run a pretty neat pipeline to deploy static CloudFormation Templates.

tl;dr: Use the AWS CDK to build a static YAML file and deploy it to S3.

Workflow

Use the the CDK to create a CloudFormation Stack.

Integration

A GitHub Action in integration.yml runs cdk build on every push event.

Release

A GitHub Action in release.yml creates a GitHub Release for every tag matching v0.1.0 pattern.

Deployment

The static YAML file is uploaded to the GitHub Release and your S3 Bucket.

Configuration

You need to set the following secrets for your repository:

  • AWS_BUCKET_NAME
  • AWS_BUCKET_REGION
  • AWS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

About

Continuous Integration and Deployment for CloudFormation Templates using AWS CDK and GitHub Actions.

License:MIT License


Languages

Language:TypeScript 63.9%Language:JavaScript 36.1%