AWS CloudFormation FAQs

General


General

Q: What is AWS CloudFormation?
AWS CloudFormation is a service that gives developers and businesses an easy way to create a collection of related AWS resources and provision them in an orderly and predictable fashion.
Q: What can developers now do with AWS CloudFormation that they could not before?
AWS CloudFormation automates the details of creating and managing a collection of related AWS infrastructure resources. AWS CloudFormation brings the simplicity that AWS offers for managing individual resources to the task of repeatedly and predictably creating entire groups of related resources that power your applications. Creating and inter-connecting all resources your application requires to run is now as simple as creating a single EC2 or RDS instance.
Q: How is AWS CloudFormation different from AWS Elastic Beanstalk?

Both products are designed to complement one another. AWS Elastic Beanstalk provides an environment to easily develop and run applications in the cloud. It is integrated with developer tools and provides a “one-stop-shop” experience for you to manage the lifecycle of your applications. AWS CloudFormation is a convenient deployment mechanism for a broad range of AWS resources. It supports the infrastructure needs of many different types of applications such as existing enterprise applications, legacy applications, applications built using a variety of AWS resources and container-based solutions (including those built using AWS Elastic Beanstalk).

AWS CloudFormation supports Elastic Beanstalk application environments as one of the AWS resource types. This allows you, for example, to create and manage an AWS Elastic Beanstalk hosted application along with an RDS database to store the application data. In addition to RDS instances, any other supported AWS resource can be added to the group as well (e.g. SDB domains, SQS Queues, etc.).

Q: What new concepts are introduced by AWS CloudFormation?
AWS CloudFormation introduces 2 concepts: Template, a JSON-format, text-based file that describes all the AWS resources you need to deploy to run your application and Stack, the set of AWS resources that are created and managed as a single unit when a template is instantiated by AWS CloudFormation.
Q: How do I get started with AWS CloudFormation?

AWS CloudFormation can be easily accessed through the AWS Management Console, which gives you a point-and-click, web-based interface to deploy and manage stacks. You can create a new stack from inside the AWS Management Console in a few simple steps:

  • Give the stack a name: Provide a unique name for the stack.
  • Select a template: Select a template from your local file system or from a S3 URL. This may be one of the sample AWS CloudFormation templates, your own custom template, a template you are managing in a source control repository, or a template you got from a 3rd party.
  • Specify any parameters: If the template allows you to configure the deployment, fill in any parameters or go with the default parameters specified in the template.
  • Click "Create": Start the deployment. You can see the current state of the deployment, with all the resource names and stack events in the AWS Management Console.
Q: What resource types does AWS CloudFormation support?

Today AWS CloudFormation supports the following AWS resources:

  • Amazon EC2 Instances
    (On-Demand Instances, Spot Instances, and Reserved Instances)
  • Amazon EC2 Security Groups
  • Amazon Elastic Block Store (EBS) Volumes (including Provisioned IOPS volumes)
  • Elastic Load Balancers
  • Amazon EC2 Elastic IP Addresses
  • Auto Scaling Groups
  • Auto Scaling Policies
  • Amazon RDS Database Instances (including Provisioned IOPS instances)
  • Amazon RDS Parameter Groups
  • Amazon RDS Security Groups
  • Amazon DynamoDB
  • Amazon SimpleDB Domains
  • Amazon SQS Queues
  • Amazon SNS Topics
  • Amazon SNS Subscriptions
  • AWS Elastic Beanstalk
  • Amazon CloudWatch Alarms
  • Amazon Route 53 DNS Records
  • Amazon CloudFront Distributions
  • Amazon S3 Buckets
  • AWS Identity and Access Management users, groups and policies
  • Amazon ElastiCache Cache Clusters
  • Amazon ElastiCache Cache Security Groups
  • Amazon ElastiCache Cache Parameter Groups
  • Amazon Virtual Private Cloud VPCs, Subnets, Gateways, Route Tables and Network ACLs
Q: Can I manage individual AWS resources that are part of an AWS CloudFormation stack?
AWS CloudFormation does not get in the way; you retain full control of all elements of your infrastructure. You can continue using all your existing AWS and 3rd party tools to manage your AWS resources.
Q: Which regions is AWS CloudFormation available in?
AWS CloudFormation is available in all AWS regions.
Q: What are the elements of an AWS CloudFormation template?

AWS CloudFormation templates are JSON formatted text files that are comprised of five types of elements:

  1. An optional list of template parameters (input values supplied at stack creation time)
  2. An optional list of output values (e.g. the complete URL to a web application)
  3. An optional list of data tables used to lookup static configuration values (e.g. AMI names)
  4. The list of AWS resources and their configuration values
  5. A template file format version number

Parameters allow you to customize aspects of your template at runtime, when the stack is built. For example, the RDS database size, EC2 instance types, database and webserver port numbers can be passed to AWS CloudFormation when a stack is created. Each parameter can have a default value and description and may be marked as “NoEcho” in order to hide the actual value you enter on the screen and in the AWS CloudFormation event logs. When you create an AWS CloudFormation stack, the AWS Management Console will automatically synthesize and present a pop-up dialog form for you to edit parameter values.

Output values are a very convenient way to present a stack’s key resources (such as the address of an Elastic Load Balancer or RDS database) to the user via the AWS Management Console, or the command line tools. You can use simple functions to concatenate string literals and value of attributes associated with the actual AWS resources.

Q: How does AWS CloudFormation choose actual resource names?
You can assign logical names to AWS resources in a template. When a stack is created AWS CloudFormation binds the logical name to the name of the corresponding actual AWS resource. Actual resource names are a combination of the stack and logical resource name. This allows multiple stacks to be created from a template without fear of name collisions between AWS resources.
Q: Can I install software at stack creation time using AWS CloudFormation?
Yes. AWS CloudFormation provides a set of application boostrapping scripts that enable you to install packages, files and services on your EC2 instances by simply describing them in your CloudFormation template. For more details and a how-to see Bootstrapping Applications via AWS CloudFormation.
Q: Can I use AWS CloudFormation with Opscode Chef?
Yes. AWS CloudFormation can be used to bootstrap both the Chef Server and Chef Client software on your EC2 instances. For more details and a how-to see Integrating AWS CloudFormation with Opscode Chef.
Q: Can I use AWS CloudFormation with Puppet?
Yes. AWS CloudFormation can be used to bootstrap both the Puppet Master and Puppet Client software on your EC2 instances. For more details and a how-to see Integrating AWS CloudFormation with Puppet.
Q: Does AWS CloudFormation support EC2 tagging?

Yes. EC2 resources that support the tagging feature can also be tagged in an AWS template. The tag values can refer to template parameters, other resource names, resource attribute values (e.g. addresses), or values computed by simple functions (e.g. a concatenated a list of strings).

AWS CloudFormation automatically tags EBS volumes and EC2 instances with the name of the AWS CloudFormation stack they are part of.

Q: Do I have access to the EC2 instance, or Auto Scaling Launch Configuration user-data fields?
Yes. You can use simple functions to concatenate string literals and attribute values of the AWS resources and pass them to user-data fields in your template. Please refer to our sample templates to learn more about these easy to use functions.
Q: What happens when one of the resources in a stack cannot be created successfully?
By default, the “automatic rollback on error” feature is enabled. This will cause all AWS resources that AWS CloudFormation created successfully for a stack up to the point where an error occurred to be deleted. This is useful when, for example, you accidentally exceed your default limit of Elastic IP addresses, or you don’t have access to an EC2 AMI you’re trying to run. This feature enables you to rely on the fact that stacks are either fully created, or not at all, which simplifies system administration and layered solutions built on top of AWS CloudFormation.
Q: Can stack creation wait for my application to start up?
Yes. AWS CloudFormation provides a WaitCondition resource that acts as a barrier, blocking the creation of other resources until a completion signal is received from an external source such as your application, or management system.
Q: Can I save my data when a stack is deleted?
Yes. AWS CloudFormation allows you to define deletion policies for resources in the template. You can specify that snapshots be created for Amazon EBS volumes or Amazon RDS database instances before they are deleted. You can also specify that a resource should be preserved and not deleted when the stack is deleted. This is useful for preserving Amazon S3 buckets when the stack is deleted.
Q: Can I update my stack after it has been created?
Yes. You can use CloudFormation to modify and update the resources in your existing stacks in a controlled and predictable way. By using templates to manage your stack changes, you have the ability to version control your AWS infrastructure in the same way as you version control the software running on it.
Q: Can I create stacks in a Virtual Private Cloud (VPC)?
Yes. CloudFormation supports creating VPCs, Subnets, Gateways, Route Tables and Network ACLs as well as creating resources such as Elastic IPs, Amazon EC2 Instances, EC2 Security Groups, Auto Scaling Groups, Elastic Load Balancers, Amazon RDS Database Instances and Amazon RDS Security Groups in a VPC.

Getting Started

Q: How do I sign up for AWS CloudFormation?
To sign up for AWS CloudFormation, click the “Begin Using AWS CloudFormation” button on the AWS CloudFormation detail page. You must have an Amazon Web Services account to access this service; if you do not already have one, you will be prompted to create one when you begin the AWS CloudFormation process. After signing up, please refer to the AWS CloudFormation documentation, which includes our Getting Started Guide.
Q: Why am I asked to verify my phone number when signing up for AWS CloudFormation?
AWS CloudFormation registration requires you to have a valid phone number and email address on file with AWS in case we ever need to contact you. Verifying your phone number takes only a few minutes and involves receiving an automated phone call during the registration process and entering a PIN number using the phone key pad.
Q: How do I get started after I have signed up?
The best way to get started with AWS CloudFormation is to work through the Getting Started Guide, which is included in our technical documentation. Within a few minutes, you will be able to deploy and use one of our sample templates that illustrate how to create the infrastructure needed to run applications such as Tracks, WordPress and others.
Q: Are there sample templates that I can use to check out AWS CloudFormation?
Yes, AWS CloudFormation includes sample templates that you can use to test drive the offering and explore its functionality. Our sample templates illustrate how to interconnect and use multiple AWS resources in concert, following best practices for multiple availability zone redundancy, scale out and alarming. To get started, all you need to do is to click “Create Stack” and select one of our samples in the AWS Cloud Formation console tab. Once created, consult the “Template” and “Parameter” tabs in the AWS Management Console to look at the details of the template file used to create the respective stack.

Billing

Q: How much does AWS CloudFormation cost?
There is no additional charge for AWS CloudFormation. You only pay for the AWS resources that are created (e.g. Amazon EC2 instances, Elastic Load Balancers etc.)
Q: Will I be charged for resources that were rolled back during a failed stack creation attempt?
Yes. Charges for AWS resources created during template instantiation apply irrespective of whether the stack as a whole could be created successfully or not.

Limits, Restrictions

Q: Are there limits to the number of templates or stacks?
There are no limits to the number of templates. Each AWS CloudFormation account is limited to a maximum of 20 stacks. Complete our request for a higher limit here and we will respond to your request within two business days.
Q: Are there limits to the size of description fields?
Template, Parameter, Output and Resource description fields are limited to 4096 characters.
Q: Are there limits to the number of parameters or outputs in a template?
You can include up to 50 parameters and 10 outputs in a template.

Regions and Endpoints

Q: What are the AWS CloudFormation service access points in each region?
Q: Will AWS CloudFormation be available in all regions where AWS services are available?
AWS CloudFormation is currently available in the US East (N. Virginia), US West (Oregon), US West (N. California), EU (Ireland), Asia Pacific (Singapore), Asia Pacific (Tokyo), Asia Pacific (Sydney)and South America (Sao Paulo) regions.
©2013, Amazon Web Services, Inc. or its affiliates. All rights reserved.