AWS CloudFormation gives developers and systems administrators an easy way to create a collection of related AWS resources and provision them in an orderly and predictable fashion. The AWS CloudFormation samples package contains a collection of templates that illustrate various usage cases. Stacks can be created from the templates via the AWS Management Console, the AWS CLI, the AWS CloudFormation APIs, or the AWS Toolkits. You can use the templates as-is or you can use them as a starting point for creating your own templates. All the sample templates can be downloaded here.
AWS CloudFormation is available in all AWS regions. For more details click here.
Template URL | Description | Launch in Asia Pacific (Sydney) Region |
---|---|---|
Windows_Single_Server_SharePoint_Foundation.template | SharePoint® Foundation 2010 running on Microsoft Windows Server® 2008 R2 | Launch Stack |
Windows_Single_Server_Active_Directory.template | Create a single server installation of Active Directory running on Microsoft Windows Server® 2008 R2. | Launch Stack |
Windows_Roles_And_Features.template | Create a single server specifying server roles running on Microsoft Windows Server® 2008 R2. | Launch Stack |
* Microsoft, Windows Server, and SharePoint are trademarks of the Microsoft group of companies.
The following sample templates show you how to provision existing open source application stack. Each of the samples shows how to deploy and install the application at launch time using the AWS CloudFormation application bootstrap support described here.
The following sample templates show you how to provision application frameworks by setting up Hello World applications:
Description | Template URL | Launch in Asia Pacific (Sydney) Region |
---|---|---|
A simple LAMP stack running a PHP "Hello World" application. | Single EC2 Instance with local MySQL database | Launch Stack |
Single EC2 Instance web server with Amazon RDS database instance | Launch Stack | |
Highly Available Web Server with Multi-AZ Amazon RDS Instance | Launch Stack | |
A simple Ruby on Rails "Hello World" application. | Single EC2 Instance with local MySQL database | Launch Stack |
Single EC2 Instance web server with Amazon RDS database instance | Launch Stack | |
Highly Available Web Server with Multi-AZ Amazon RDS Instance | Launch Stack |
The following sample templates illustrate how to use different resources or template features:
Template URL | Description | Launch in Asia Pacific (Sydney) region |
---|---|---|
auto_scaling_with_instance_profile.template | Create an Auto Scaling group with an an associated instance profile. | Launch Stack |
AutoScalingKeepAtNSample.template | An example of using Auto Scaling groups to manage a set of EC2 instances. | Launch Stack |
AutoScalingMultiAZSample.template | An example of using Load Balanced, Auto Scaling groups spanning multiple EC2 availability zones. This template has been updated to use Auto Scaling Policies. | Launch Stack |
AutoScalingMultiAZWithNotifications.template | An example of using Load Balanced Auto Scaling groups spanning multiple EC2 availability zones. This template uses Auto Scaling Policies and configures Auto Scaling notifications so that you can get emails when scaling events occur. | Launch Stack |
AutoScalingRollingUpdates.template | Example of creating an Auto Scaling group with a rolling upgrade policy. | Launch Stack |
AutoScalingScheduledAction.template | Example of creating an Auto Scaling group with scheduled scaling actions. | Launch Stack |
bees-with-machineguns.template | Create a load balancer, a Bees With Machine Guns Controller, and spot instances behind the load balancer; fire up bwmg and trigger attack; store logs on S3 then shutdown (if enabled). | Launch Stack |
CloudFront_S3.template | An example of using a CloudFront distribution with an S3 origin. | Launch Stack |
CloudFront_MultiOrigin.template | Example of creating and using a CloudFront Multi-Origin Distribution. | Launch Stack |
DynamoDB_Table.template | Example of creating and using a DynamoDB table. | Launch Stack |
DynamoDBSI.template | Example of creating a DynamoDB table with local and global secondary indexes. | Launch Stack |
EC2WithEBSPIOPs.template | Create an Amazon Ec2 instance and an EBS volume with Provisioned IOPs. | Launch Stack |
ec2_instance_with_instance_profile.template | Create an EC2 instance with an associated instance profile. | Launch Stack |
EC2ChooseAMI.template | An example of using Mappings to select an AMI based on region and instance type. | Launch Stack |
EC2InstanceSample.template | Simple EC2 instance example. | Launch Stack |
EC2InstanceWithSecurityGroupSample.template | Simple EC2 instance with a security group. | Launch Stack |
EC2WebSiteSample.template | Simple EC2-based website. | Launch Stack |
EC2WithEBSSample.template | Sample of attaching an EBS volume to an EC2 instance. | Launch Stack |
EC2WithMetadata.template | Example of using resource metadata with an EC2 instance resource. | Launch Stack |
EC2_Untargeted_Launch_with_EBS_Volume.template | Untargeted launch of an EC2 instance with an attached EBS volume. | Launch Stack |
EC2_Instance_With_Block_Device_Mapping.template | Example of creating an EC2 instance with Block Device Mappings. | Launch Stack |
EC2_Instance_With_Ephemeral_Drives.template | Example of creating an EC2 instance using Ephemeral storage devices. | Launch Stack |
EC2InstanceWithEBSVolumeConditionalIOPs.template | Example of creating an EC2 instance with optional volume and optional PIOPs. | Launch Stack |
EBS_Snapshot_On_Delete.template | Sample of attaching an EBS volume to an EC2 instance with the snapshot deletion policy. This will cause a snapshot of the EBS volume to be taken prior to the EBS volume resource being deleted. | Launch Stack |
EIP_With_Association.template | Associate an EC2 Instance with a pre-existing EIP. | Launch Stack |
ElasticBeanstalk_Nodejs_Sample.template | Launch an AWS Elastic Beanstalk Node.js sample application. | Launch Stack |
Elastic-Beanstalk-in-VPC.template | Launch an AWS Elastic Beanstalk sample application in a VPC. The template creates a VPC and launches an Elastic Beanstalk application in it. | Launch Stack |
ElasticBeanstalk_Ruby_Sample.template | Launch an AWS Elastic Beanstalk Ruby sample application. | Launch Stack |
ElasticBeanstalk_Python_Sample.template | Launch an AWS Elastic Beanstalk Python sample application. | Launch Stack |
ElasticBeanstalkSample.template | Startup the AWS Elastic Beanstalk Sample Application | Launch Stack |
ElasticBeanstalk_Simple.template | Sample AWS Beanstalk application connected to an Amazon RDS database instance | Launch Stack |
ElasticBeanstalk_PHP_Sample.template | Launch an AWS Elastic Beanstalk PHP sample application. | Launch Stack |
multi-tier-vpc.template | Create a VPC that is configured to allow Elastic Beanstalk applications to launch into. | Launch Stack |
ElastiCache.template | Example of creating an ElastiCache Cache Cluster with Memcached engine - The template also deploys a sample PHP application that connects to the Cache Cluster. | Launch Stack |
ElastiCache_Redis.template | Example of creating an ElastiCache Cache Cluster with Redis engine - The template also deploys a sample PHP application that connects to the Cache Cluster. | Launch Stack |
VPC_ElastiCache_Cluster.template | Example of creating an ElastiCache Cache Cluster inside a VPC - The template also deploys a sample PHP application that connects to the Cache Cluster. | Launch Stack |
ELBSample.template | Elastic Load Balancer with a health check | Launch Stack |
ELBStickinessSample.template | Elastic Load Balancer example configured with cookie-based stickiness. | Launch Stack |
ELBWithLockedDownEC2Instances.template | Elastic Load Balancer with instances that are locked down to only receive traffic from the load balancer. | Launch Stack |
ELBWithLockedDownAutoScaledInstances.template | Elastic Load Balancer with and Auto Scaling group that is locked down to only receive traffic from the load balancer. | Launch Stack |
ELBGDAL.template | Elastic Load Balancer with Connection Draining and Access Logs | Launch Stack |
ELBZoneApex.template | Map an Elastic Load Balancer to a DNS Zone apex. | Launch Stack |
IAM_Users_Groups_and_Policies.template | Example of creating IAM users, groups and policies. | Launch Stack |
IAM_Policies_for_S3.template | Example of using IAM policies to configure access to an S3 bucket. | Launch Stack |
IAM_Policies_SNS_Publish_To_SQS.template | Example of using IAM policies to configure an SNS topic to publish to an SQS queue. | Launch Stack |
Mutually_Referencing_EC2_Security_Groups.template | Example of creating EC2 security groups that mutually reference each other. | Launch Stack |
OpsWorks.template | Example showing how to create a VPC environment for AWS OpsWorks | Launch Stack |
OpsWorksVPCELB.template | Example provisioning a load balanced OpsWorks application inside a VPC | Launch Stack |
Parameter_Validate.template.template | Parameter validation examples. | Launch Stack |
RDS_PIOPS.template | Create an RDS database with Provisioned IOPs. | Launch Stack |
RDS_with_DBParameterGroup.template | Create an RDS database with DBParameter group settings. | Launch Stack |
RDS_Version.template | Example of creating an Amazon Relational Database Service database instance with a specific MySQL version. | Launch Stack |
RDS_MySQL_55.template | Instantiate an RDS MySQL V5.5 database instance with best practice alarm configuration. | Launch Stack |
RDS_MySQL_With_Read_Replica.template | Example with an RDS Read Replica which allows scaling beyond the capacity of the primary database instance for read-heavy workloads. | Launch Stack |
RDSDatabaseWithOptionalReadReplica.template | Example of an RDS instance with an optinoal RDS Read Replica. | Launch Stack |
RDS_VPC.template | Example of creating an Amazon RDS database instance in a VPC using VPC security groups. | Launch Stack |
RDS_Snapshot_On_Delete.template | Example of creating an Amazon Relational Database Service database instance with the snapshot deletion policy. This will cause a snapshot of the Amazon RDS database instance to be created before the database resource is deleted. | Launch Stack |
RDS_Oracle.template | Instantiate an RDS Oracle database instance. | Launch Stack |
Redshift.template | Provision a Redshift cluster. | Launch Stack |
RedshiftClusterInVpc.template | Provision a VPC and a Redshift cluster inside the VPC. | Launch Stack |
Route53_A.template | Example of creating an Amazon Route 53 DNS A record associated with an EC2 instance. | Launch Stack |
Route53_CNAME.template | Example of creating an Amazon Route 53 DNS CNAME record. | Launch Stack |
Route53_RoundRobin.template | Example of using Route 53 weighted round robin (WRR) DNS records. | Launch Stack |
S3_Bucket.template | Example of creating a publicly accessible S3 bucket. | Launch Stack |
S3_Bucket_With_Tags.template | Example of creating a publicly accessible S3 bucket. | Launch Stack |
S3_Website_Bucket_With_Retain_On_Delete.template | Example of creating an S3 bucket with the retain deletion policy to keep the bucket after the stack is deleted. | Launch Stack |
S3_With_CloudFront_Distribution.template | Example of creating a website using an S3, website-enabled bucket, distributed globally via CloudFront. | Launch Stack |
S3_Website_With_CloudFront_Distribution.template | Example of creating a website using an S3, website-enabled bucket, distributed globally via CloudFront. | Launch Stack |
S3Bucket_Auth_1.template, S3Bucket_Auth_2.template, S3Bucket_Lockdown_to_IAM_User.template, S3Bucket_SourceAuth.template | Examples showing how to use cfn-init to download files and sources from an authenticated (non-public) location. | |
SQS.template | Example of creating an Amazon SQS queue. | Launch Stack |
SQSWithQueueName.template | Example of creating an Amazon SQS queue with a custom name. | Launch Stack |
SNSToSQS.template | Create an SNS topic that can send messages to two SQS queues with appropriate permissions for one IAM user to publish to the topic and another to read messages from the queues. | Launch Stack |
SQS_With_CloudWatch_Alarms.template | Example of using Amazon CloudWatch alarms with Amazon SQS metrics. | Launch Stack |
WaitObject.template | Example of using a WaitCondition resource to block stack creation until an external event occurs. | Launch Stack |
multi-tier-web-app-in-vpc.template | Create a multi-tier web application in a VPC with multiple subnets. The first subnet is public and contains and internet facing load balancer, a NAT device for internet access from the private subnet and a bastion host to allow SSH access to the hosts in the private subnet. The second subnet is private and contains a Frontend fleet of EC2 instances, an internal load balancer and a Backend fleet of EC2 instances. | Launch Stack |
vpc_single_instance_in_subnet.template | Create a VPC, subnet, internet gateway, routing table and network ACL and add an EC2 instance running a sample PHP application with an Elastic IP address and a security group. | Launch Stack |
vpc_multiple_subnets.template | Create a VPC with multiple subnets. The first subnet is public and contains the load balancer, the second subnet is private and contains an EC2 instance behind the load balancer. | Launch Stack |
VPC_Instance_With_Association.template | Example of launching and Amazon EC2 instance in a pre-existing Amazon Virtual Private Cloud and associating it with an existing VPC-based Elastic IP Address. | Launch Stack |
VPC_EC2_Instance_with_EIP_and_Security_Group.template | Launch an Amazon EC2 instance and an associated Elastic IP address in an existing VPC. | Launch Stack |
VPC_EC2_Instance_With_Multiple_Dynamic_IPAddresses.template | Example of launching an EC2 instance in an existing VPC with multiple IP addresses using DHCP | Launch Stack |
VPC_EC2_Instance_With_Multiple_Static_IPAddresses.template | Example of launching an EC2 instance in an existing VPC with multiple static IP addresses | Launch Stack |
VPC_With_PublicIPs_And_DNS.template | Example of launching an EC2 instance with a Public IP in a new VPC and with DNS resolution on the VPC | Launch Stack |
VPC_AutoScaling_and_ElasticLoadBalancer.template | Launch an Auto Scaling Group and an associated Elastic Load Balancer in an existing VPC. | Launch Stack |
VPC_AutoScaling_With_Public_IPs.template | Launch an Auto Scaling Group and an associated Elastic Load Balancer in a VPC where instances can directly access the Internet using Public IPs. | Launch Stack |
VPC_RDS_DB_Instance.template | Launch an Amazon RDS Database instance in an existing VPC. | Launch Stack |
VPC_With_VPN_Connection.template | Example of creating a VPC with static routing to an existing VPN | Launch Stack |
VPC_WordPress_Single_Instance_With_RDS.template | Launch a single instance WordPress installation using an Amazon RDS database instance for storage in an existing VPC. | Launch Stack |
worker-role.template | Create a multi-az, Auto Scaled worker that pulls command messages from a queue and execs the command. This template uses spot instances as the workers. | Launch Stack |
AWS CloudFromation provides helper scripts to make it easy for you to bootstrap applications in the cloud. We have provided several whitepapers that describe how AWS CloudFormation can help you to configure and/or install your application as well as how to bootstrap deployment and management tools that you may already use in your environment such as Chef and Puppet. The following templates accompany those whitepapers:
Template URL |
Description |
Launch in Asia Pacific (Sydney) region |
---|---|---|
wordpress-via-cfn-bootstrap.template | Install the open source WordPress application using the AWS CloudFormation application bootstrap helper scripts. | Launch Stack |
wordpress-via-chef-solo.template | Install the open source WordPress application using Opscode Chef Solo. Opscode Chef Solo is bootstrapped using the AWS CloudFormation application bootstrap helper scripts. | Launch Stack |
wordpress-via-chef-solo-building-block.template | Install the open source WordPress application using Opscode Chef Solo. Opscode Chef Solo is bootstrapped using the AWS CloudFormation application bootstrap helper scripts in an embedded template chef-solo-configuration.template. | Launch Stack |
chef-server-ubuntu-configuration.template | Install an OpsCode Chef Server. | Launch Stack |
wordpress-via-chef-client.template | Install the open source WordPress application using Opscode Chef Client. You need to deploy a Chef Server using the previous template. | Launch Stack |
puppet-master-configuration.template | Install a Puppet Master. | Launch Stack |
wordpress-via-puppet-client.template | Install the open source WordPress application using the Puppet Client. You need to deploy a Puppet Master using the previous template. | Launch Stack |
wordpress-via-puppet-client-building-block.template | Install the open source WordPress application with the Puppet Client using the Puppet configuration in an embedded template puppet-client-configuration.template. You need to deploy a Puppet Master using the previous template. | Launch Stack |
SampleRailsApp.template | Build the default sample Rails application dynamically at runtime using the Amazon Linux AMI and Cloud-init. For more details click here. | Launch Stack |
Template URL | Description | Launch in Asia Pacific (Sydney) Region |
---|---|---|
UpdateTutorial+Part1.template, UpdateTutorial+Part2.template, UpdateTutorial+Part3.template, UpdateTutorial+Part4.template, UpdateTutorial+Part5.template | Tutorial templates associated with the stack update walk-through in the AWS CloudFormation User Guide. | Launch Stack |
- Simply click on the "Launch Now" link for the template you want to use in the tables above.
- A name will automatically be filled in for the stack. Either use the one specified or change it as required.
- Press "Continue" and follow the instructions on the screen.
- Log into the AWS Management Console.
- Click on the "AWS CloudFormation" tab.
- Click the "Create Stack" button.
- Fill in a name for your stack.
- Click on "Provide a Template URL" and fill in the URL of the sample you want to use.
- Press "Continue" and follow the instructions on the screen.
CloudFormer is a prototype tool that enables you to create AWS CloudFormation templates from the existing AWS resources in your account. You can provision and configure your application resources the way you want using your existing processes and tools. Once everything is setup and you have the resources provisioned, simply take a "snapshot" of the configuration to create a template, enabling you to launch copies of the application with just a few clicks through the AWS Management Console. The CloudFormer tool is packaged as a standalone application that you can launch inside your AWS environment. The application is started on a t1.micro Amazon EC2 instance via AWS CloudFormation. No other AWS resources are required to run CloudFormer.
Click here to launch CloudFormer.
You must reference a template in an S3 bucket in the same region in which you are creating the stack. Each sample template is available in every AWS Region. You can use the same template files from each region from the following pages:
- US East (N. Virginia) region
- US West (Oregon) region
- US West (N. California) region
- EU West (Ireland) region
- Asia Pacific (Singapore) region
- Asia Pacific (Tokyo) region
- Asia Pacific (Sydney) region
- South America (Sao Paulo) region
- AWS GovCloud (US) region
Note: CloudFormation sample templates are AWS Content under the AWS Customer Agreement and may only be used in connection with AWS CloudFormation.
Note: CloudFormation sample templates are AWS Content under the AWS Customer Agreement and may only be used in connection with AWS CloudFormation.