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
12
votes
2 answers

Conditional Property in AWS CloudFormation

We've got an AWS CloudFormation template for creating some EC2 instances. Some of those however require a specific PrivateIpAddress and I'm struggling to figure out how to incorporate that to the template. For now I've got a template parameter…
MLu
  • 23,798
  • 5
  • 54
  • 81
11
votes
2 answers

Cloudformation fails with "AMI cannot be described"

I made a change to my cloudformation template, just adding mappings, and userdata in the AWS::AutoScaling::LaunchConfiguration, and now it fails to create my stack with the message "AMI cannot be described". Any idea why? Google does bring much help…
user2707671
  • 371
  • 2
  • 10
10
votes
1 answer

How to retrieve AWS SNS Arn value

Im planning to use nested stack to create (SNS,ELB and application ) stacks.so now once the sns is created i have to pass arn value to ELB and application json(cloud formation templates)so what is the resource name to get SNS arn once its…
10
votes
4 answers

Cloudformation can I create a new role referencing an existing policy?

At the moment I have a shared S3 bucket which has specific access to particular key paths (i.e. folders) for different instances. I've been able to create instance profile with my new role and test no problem limiting to access to that folder. My…
hughmcmanus
  • 201
  • 1
  • 2
  • 3
9
votes
1 answer

Can't SSH into AWS CloudFormation Stack Instance

I have a scalable load balancer set up right now that was mostly followed from this template: https://github.com/satterly/AWSCloudFormation-samples/blob/master/LAMP_Multi_AZ.template After adjusting the…
9
votes
2 answers

Is it possible to update an existing EC2 security group from CloudFormation?

I have a manually created security group to access Redis, and I am creating a LAMP stack with AWS CloudFormation. I need to update the Amazon EC2 security group from Redis to allow access from this LAMP stack, but I want it to be updated through…
Martin
  • 553
  • 1
  • 5
  • 11
9
votes
1 answer

Can an AWS CloudFormation create a KeyPair to subsequently use when starting instances?

I would like to launch my stack using a keypair that is created as part of the CloudFormation. Is that possible? .... "Resources": { "ReverseProxyKeyPair": { "Type": "AWS::EC2::KeyPair", "Properties": { "KeyName":…
Peter Mounce
  • 1,243
  • 4
  • 16
  • 28
8
votes
1 answer

How to specify VPC and subnet in AWS CloudFormation template

I am trying to launch an example CloudFormation template as described in Getting Started with CloudFormation. I removed the default VPC, added new one (10.0.0.0/16), and created a new subnet in it (10.0.0.0/24). According to the AWS docs, I can't…
ipeacocks
  • 321
  • 1
  • 3
  • 10
7
votes
1 answer

How can one configure an AWS ElasticSearch access policy using CloudFormation?

The AWS documentation on ElasticSearch access control talks about how to grant access to the ES domains subresources while preventing changes to the domain's configuration by creating an ES domain resource policy and setting the resource to the ES…
7
votes
1 answer

generate permissions for cloudformation stack deployment

I have CloudFormation stack, which is frequently updated by a script (changing source AMIs for launch configuration). I would love to have it deployed by the same script, executed by non-privileged user/instance role. Currently all updates are made…
7
votes
5 answers

AWS Cloudformation - can't add multiple subnet associations to a public routing table

We have a VPC with an Internet Gateway. We have 3 subnets (one in each AZ) and want to use one routing table for all three. This RT contains a rule to route 0.0.0.0/0 to the igw however when we try associate more than one subnet with this RT the…
Marcus
  • 165
  • 3
  • 10
7
votes
2 answers

How do I associate an ssh key pair with the instance created by a stack in Amazon CloudFormation?

Previously I have created an EC2 instance based on an image. During the creation process the Amazon wizard created a key pair and then provided it to me so I could connect. Now I am trying to use CloudFormation instead, so that my new server has…
Shannon Wagner
  • 375
  • 3
  • 5
  • 20
6
votes
2 answers

AWS Fargate task fails ELB health checks

How can I troubleshoot it further? I am trying to run a simple nginx container but the load balancer complains that health checks are failed and the task does not respond on its ip number, likely because of the error with the load balancer. I set…
6
votes
3 answers

Determine IAM requirements for Cloudformation Stack

I'm currently developing and launching a relatively simple cloudformation stack. Just some simple RDS stuff, triggered through and external CI+CD service. However, my current cycle for development is incredibly inefficient, purely because I don't…
SCB
  • 161
  • 6
6
votes
1 answer

Cloud Formation template add ingress rule to existing security group

Problem scope I have an application built using multiple cloud formation templates. They need to interact with each other but are too large/complicated to build in one template. Detail of scenario Imagine there were only two template (there are…
Sam
  • 617
  • 1
  • 5
  • 14
1
2
3
17 18