AWS CloudFormation
User Guide (API Version 2010-05-15)

Selecting a Stack Template

After starting the Create Stack wizard, you specify the template that you want AWS CloudFormation to use to create your stack.

AWS CloudFormation templates are JSON- or YAML-formatted files that specify the AWS resources that make up your stack. For more information about AWS CloudFormation templates, see Working with AWS CloudFormation Templates.

To choose a stack template:

  1. On the Select Template page, choose a stack template by using one of the following options:

    Design a template

    To create or modify a template, use AWS CloudFormation Designer, a drag-and-drop interface. For more information, see What Is AWS CloudFormation Designer?.

    Choose a template
    • Select a sample template.

      Select an AWS CloudFormation template from a list of samples. For descriptions of the templates, see Sample Templates.

      To create a stack from existing AWS resources by using the CloudFormer tool, select CloudFormer from the list. For more information, see Using CloudFormer (Beta) to Create Templates.

    • Upload a template to Amazon S3.

      Select an AWS CloudFormation template on your local computer. Choose Choose File to select the template file that you want to upload. The template can be a maximum size of 460,800 bytes.

      If you use the CLI or API to create a stack, you can upload a template with a maximum size of 51,200 bytes.


      If you upload a local template file, AWS CloudFormation uploads it to an Amazon Simple Storage Service (Amazon S3) bucket in your AWS account. If you don't already have an S3 bucket that was created by AWS CloudFormation, it creates a unique bucket for each Region in which you upload a template file. If you already have an S3 bucket that was created by AWS CloudFormation in your AWS account, AWS CloudFormation adds the template to that bucket.

      Considerations to keep in mind about S3 buckets created by AWS CloudFormation

      • The buckets are accessible to anyone with Amazon S3 permissions in your AWS account.

      • AWS CloudFormation creates the buckets with server-side encryption enabled by default, thereby encrypting all objects stored in the bucket.

        You can directly manage encryption options for buckets that AWS CloudFormation has created; for example, using the Amazon S3 console at , or the AWS CLI. For more information, see Amazon S3 Default Encryption for S3 Buckets in the Amazon Simple Storage Service Developer Guide.

      • You can use your own bucket and manage its permissions by manually uploading templates to Amazon S3. When you create or update a stack, specify the Amazon S3 URL of a template file.

    • Specify an Amazon S3 template URL.

      Specify a URL to a template in an S3 bucket.


      If your template includes nested stacks (for example, stacks described in other template documents located in subdirectories), ensure that your S3 bucket contains the necessary files and directories.

      If you have a template in a versioning-enabled bucket, you can specify a specific version of the template, such as For more information, see Managing Objects in a Versioning-Enabled Bucket in the Amazon Simple Storage Service Console User Guide.

      The URL must point to a template with a maximum size of 460,800 bytes that is stored in an S3 bucket that you have read permissions to and that is located in the same region as the stack. The URL can be a maximum of 1024 characters long.

  2. To accept your settings, choose Next, and proceed with specifying the stack name and parameters.

    Before creating resources, AWS CloudFormation validates your template to catch syntactic and some semantic errors, such as circular dependencies. During validation, AWS CloudFormation first checks if the template is valid JSON. If it isn't, AWS CloudFormation checks if the template is valid YAML. If both checks fail, AWS CloudFormation returns a template validation error.