Cloudformation Template Multiple Ec2 Instances
Launching an aws ec2 instance using cloudformation template aws cloudformation is a service which gives us the flexibility to manage and provision our aws resources.
Cloudformation template multiple ec2 instances. Find file copy path tongueroo fix extensions 0158332 sep 12 2017. For more information about updating stacks see aws cloudformation stacks updates. Aws cloudformation simplifies provisioning and management on aws. Customers sometimes ask me if theres a way to optimize large aws cloudformation templates which can take several minutes to deploy a stack.
Brian mancinis picture brian mancini. He explains how to optimize templates so that aws cloudformation quickly deploys your environments. Specifies an ec2 instance. Brian is cto of altangent labs.
The drawback with this approach is that you will need to knoe beforehand how many ec2s are needed. Instance count is not supported by cloudformation template. If an elastic ip address is attached to your instance aws cloudformation reattaches the elastic ip address after it updates the instance. Cloudformation examples templates single instanceyml.
Alternative approach is to use tools like troposphere cloudtoolstroposphere. Amazon ec2 instance in a security group creates an amazon ec2 instance in an amazon ec2 security group awstemplateformatversion. It gives us the option to choose sample templates or to design our custom templates to launch and provision the resources. You can also easily update or replicate the stacks as needed.
The following post is by guest blogger julien lepine solutions architect at aws. You can create templates for the service or application architectures you want and have aws cloudformation use those templates for quick and reliable provisioning of the services or applications called stacks.