CDK bootstrap for public S3 asset buckets
Photo generated by chatGPT
cdk-construct

CDK bootstrap for public S3 asset buckets

How to quickly setup your distribution buckets in all AWS regions

  • Date: 30 Mar, 2024
  • Client: Open Source
  • Role: Developer

Introduction

Imagine you build a cdk construct and you want to distribute the generate cloudformation stack via S3 bucket in your distributions AWS account.

Challenge

That said the following challenges will arise:

  • How do you configure you S3 buckets to be publicly readable?
  • How and where do you store the assets, e.g the code of the cloudformation custom resources?
  • In which regions do you have to deploy those buckets?
  • How do you deploy the code into those bucket, e.g. via GitHub actions?

This is what this cdk construct does for you.

Solution

Creates the boostrap resources for publishing your cdk construct with assets to public S3 buckets, so others can use them as cloudformation templates.

Does the following:

  • Creates S3 asset bucket in the defined regions
  • Creates one S3 release bucket for the main template
  • Configures IAM roles for the specified GitHub repositories.

See also the related deep technical post here 👈

Conclusion

Because other folks might have the same challenge, I published the module on GitHub:

👉 https://github.com/MV-Consulting/s3-cdk-assets-bootstrap