This repository creates an S3 bucket via a Cloudformation template
Warning: this template creates AWS resources which incur costs.
This Cloudformation template sets up the following:
- A S3 bucket
- Add this to your Github repository as a submodule:
git submodule add git@github.com:data-derp/s3-bucket-aws-cloudformation.git
- This module creates AWS Resources which could incur costs
- Set up your AWS CLI and authenticate to your AWS account.
- OPTIONAL: Switch your role. For those expected to assume a role (within the same account) to perform AWS operations, there is a helper function:
./github-runner-aws-cloudformation/switch-role -b <starting-profile> -t <target-role>
This uses credentials in your -b <starting-profile>
to switch into the -t <target-role>
. You can now use the target role's credentials by using the AWS_PROFILE data-derp
export AWS_PROFILE=data-derp
- Create the Stack.
./s3-bucket-aws-cloudformation/create-stack -p <your-project-name> -m <your-team-name> -r <aws-region>
💡 the your-project-name
and your-team-name
must be globally unique as an AWS S3 bucket is created (this resource is globally unique)
-
View your Cloudformation Stacks in the AWS Console
-
When you're done, destroy your stack:
./s3-bucket-aws-cloudformation/delete-stack -p <your-project-name> -m <your-team-name> -r <aws-region>