In order for the Launch Stack buttons to work the CloudFormation templates must be hosted on an S3 bucket on AWS. This guide explains how to upload the templates to S3 using the aws cli.
-
Create an S3 Bucket to store the CloudFormation templates. The bucket must be publicy accessible.
-
Package and upload the templates to S3:
$ aws cloudformation package \ --template-file master.yml \ --output-template-file master.packaged.yml \ --s3-bucket <YOUR_S3_BUCKET>
This command will replace the local references in the templates and upload them to S3. The output of this command is a template named master.packaged.yml.
-
Upload the master.packaged.yml file to S3:
$ aws s3 cp master.packaged.yml s3://<YOUR_S3_BUCKET>/
Once the templates are uploaded in S3 you can copy the URL of the master.packaged.yml file and use it in the Launch Stack buttons URL.
Note that the URL of the button is a CloudFormation URL with some query string parameters to pre-populate the CloudFormation fields.
CloudFormation requires that the S3 bucket that hosts the templates must be in the same region of the Stack that will be deployed, so multiple buckets will be required to support multiple regions.
There are two options to achieve this:
- Create multiple buckets and upload the templates manually to each bucket.
- Create multiple buckets and enable S3 replication.
The easiest way to maintain multiple buckets is choosing a primary bucket and enable S3 replication to replicate the changes to each of the buckets on the different regions. For more information read the AWS documentation
nClouds recommends to support just a few popular regions for the quickstart templates and provide the manual deployment option for customers that intend to use a not supported region.