Skip to content

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

License

Notifications You must be signed in to change notification settings

sbstjn/cfn-release-example

Repository files navigation

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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published