Questions tagged [amazon-cloudformation]

Amazon Web Services CloudFormation is a JSON- or YAML-based templating system that can be used to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion. You can think of it as 'Infrastructure-as-code'.

For more information see:

256 questions
4
votes
4 answers

Amazon CloudFormation: How to get an ELB's private IP for a specific subnet?

TL;DR - Is it possible for a CloudFormation template to insert the subnet-specific internal IP address of a specific ELB into the UserData of an instance within that subnet? We have a fleet of EC2 web servers in an Amazon VPC with six subnets, one…
4
votes
3 answers

AWS Cloud Formation.Requires capabilities : [CAPABILITY_IAM] (Child Stack)

IMPORTANT I'm building the TemplateURL dynamically. "TemplateURL" : { "Fn::Join" : ["", [ { "Ref" : "TemplateURL"}, "substack.template" ]] } I'm running a CloudFormation template in the AWS Console. Running Stack Directly I started with a template…
Drew Khoury
  • 4,569
  • 8
  • 26
  • 28
4
votes
1 answer

CloudFormation - How to start a Windows Service with cfn-init

I'm creating a CloudFormation Stack that will install and start a service on a Windows Instance. I've figured out how to install the service, but how do I start the service using cfn-init? The examples seem to all use linux, as there is a…
Edwin
  • 1,011
  • 7
  • 17
4
votes
1 answer

How to connect instances in CloudFormation

We would like to create a template for a fairly standard stack in AWS. We need three layers. Layer: Elastic Load Balancer Layer: several web servers which are created / destroyed according to alarms triggered by the demand on the site Layer: a…
4
votes
1 answer

Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement

I am running this template in cloud formation to create auto scaling in ubuntu-18.04 machine and it will rollback the all instances automatically that is created by this template and giving such error like. Received 0 SUCCESS signal(s) out of 1.…
3
votes
2 answers

How to get instance id for docker host in cloudformation template

I have a simple CloudFormation stack which gets created with a template. A server which hosts one Docker container. This is part of the template that creates the host and the container: ContainerHostInstances: Type:…
3
votes
1 answer

how to get public IP of instance using cloud formation

I want to output public IP of my instance in cloud formation. This is the relevant part of my yaml file. What attribute do I have to specify to get public IP. (Here myec2 is where I described my instance) . . Outputs: instancedetails: …
3
votes
0 answers

CloudFormation fails deleting a stack if a hostedzone contains non-required records, how can it be avoided?

I wrote a CloudFormation template which creates a whole environment which includes the creation of VPC, HostedZone, Subnets, Autoscaling Groups, etc... The servers which are created and are members of the ASG's are running a user-data script the…
Itai Ganot
  • 10,424
  • 27
  • 88
  • 143
3
votes
1 answer

AWS CloudFormation creates new RDS instance

I've created a CloudFormation script that stands up a clone of our existing AWS stack. I've added in information so that CloudFormation will create RDS from either a snapshot of an existing RDS instance, or create a new instance with a named…
Glen Solsberry
  • 1,506
  • 5
  • 28
  • 35
3
votes
1 answer

A CloudFormation stack hangs on creation or deletion when custom resource lambda is broken

I have noticed that if a template contains custom resource lambda, which is broken (there is a runtime error, or it doesn't properly send a response body), then the CloudFormation stack hangs on the creation phase on this particular resource. When…
3
votes
1 answer

Cloudformation ECS keep all taskdefinition revisions

In CloudFormation ECS when I update TaskDefinition tag Image:app:2 and make update-stack, I get only the one last new revision a myapp:2. How I can keep all previous revisions in which case manually rollback to previous revision?
Alebo
  • 31
  • 1
3
votes
1 answer

Create new EC2 instance with existing EBS volume as root device using CloudFormation

I'm trying to mount an existing volume to a new EC2 Windows instance using CloudFormation. This seems like something that should be possible. Big Picture I have a vendor provided AMI which installs some preconfigured software. We want to create a…
Tim
  • 30,383
  • 6
  • 47
  • 77
3
votes
1 answer

AWS - Cannot create ElastiCache-CacheCluster - 'CacheSecurityGroup not found error'

I have a cloud formation script shown below, I hope to create a Security Group and Elasti Cache. However I get an error shown below CREATE_FAILED AWS::ElastiCache::CacheCluster CacheSecurityGroup not found: elasticacheta.... I use…
3
votes
4 answers

Is there a way to create AWS autoscaling lifecycle hooks with CloudFormation without a race condition?

I am trying to use AWS autoscaling lifecycle hooks in a template that encapsulates the following things: AWS::AutoScaling::AutoScalingGroup with associated scale up/down policies, launch configuration, IAM role, etc. 2 of…
Alex B
  • 1,654
  • 2
  • 16
  • 29
3
votes
2 answers

Cloudformation ELB Cloudwatch Alarms InsufficientData

I have setup a bunch of cloudwatch alarms for my service using cloudformation. All my alarms work except for the ELB alarms. They always just show insufficient data. I can go into the console and setup the alarms manually but I want to be able to…