Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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'.

0
votes
0answers
5 views

Is it possible to populate an S3 bucket through a CloudFormation template?

I need to store some files for my CF template (GraphQL schema, Lambda source, etc) into an S3 bucket that will also (hopefully) be defined in the same template, as that seems to be the only way ...
0
votes
0answers
5 views

Modify datapoints value in cloudwatch alarm with cloudformation

The number of datapoints that must be breaching to trigger the alarm can be configured and its documented in the PutMetricAlarm API reference but it's missing from the CloudFormation docs. I tried to ...
0
votes
1answer
20 views

Scheduling EC2 Instances in AWS

I have an EC2 instance that I use rarely, so it spends a lot of time in a stopped state. Because it's using an elastic IP, I want to schedule a very brief start and stop command once an hour, to avoid ...
1
vote
1answer
24 views

How to change RDS KMS Key without losing data?

We have a PostgreSQL database hosted on AWS RDS. When it was created using cloudformation I set it to be encrypted, but didn't set the encryption key. As such it was set up to use the default ...
2
votes
1answer
14 views

Can't modify existing auto-scaling-group in cloud formation

I have created a new template in Cloud Formation and I'm willing in my cloud formation template to add a new target group to an existing auto scaling group that was created manually. What are my ...
-2
votes
1answer
30 views

How to increase limit of concurrent EC2 instances running in a region?

I am trying to add three t2.small instances to single region, in this case us-east-2, but couldn't do so. I could edit this question to tell you the precise error message if requested. How do I ...
0
votes
2answers
34 views

CloudFormation: How to export bash variable in the userdata so the vars would be available when the instance starts?

I wrote the following CloudFormation template: { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "company - LaunchConfiguration and AutoScalingGroup Template", "Parameters" : { ...
0
votes
1answer
8 views

Cloudformation Trouble with Parsing

I am having some issues w/ using CloudFormation and CloudFront. I have been using the AWS resources to form my template, found here "OpenVPNCloudFront" : { "Type" : "AWS::CloudFront::...
1
vote
0answers
27 views

AWS Stack Updates and ENIs

When I try to update a stack with a new image for one of the instances, I get an error saying: "Interface: yyy in use". It sounds like because I'm using ENIs in my stack template, the instance that ...
1
vote
0answers
33 views

How to mount to an existing EFS using Cloudformation?

Currently, I have a json that will create a EFS in an auto scaling group. However, how can I make it so it mounts an existing EFS that is previously created (so i can pre-load data) this is the ...
0
votes
0answers
17 views

How to refer Elastic beanstalk resources in Alarm

Below is the code snippet which I am using to create an elastic bean stalk. I have deleted some part of the code but I have ran this code and beanstalk is created. BeanStalkApplciation: Type: '...
2
votes
1answer
171 views

AWS::CloudFormation::Init not executing commands

I'm trying to get ansible installed on an instance. I figured I could use AWS::CloudFormation::Init to execute sudo pip install ansible. That doesn't seem to be working, though. This is my instance ...
0
votes
1answer
17 views

Unable to ssh to AWS instance after Cloudformation deployment

I'm trying to build out a small infrastructure: A single VPC A single subnet A single security group with a single rule: ssh A single instance So far, in order to make it remotely functional I've ...
1
vote
1answer
69 views

Why does creating a service in AWS ECS require the ecs:CreateService permission on all resources?

I'm trying to create a service on AWS ECS, using CloudFormation. The user trying to create service has a role granting it the ecs:CreateService permission on the cluster that will host the service. ...
0
votes
1answer
72 views

AWS Cloudformation Parameters - How to make Subnet options available based on VPC

I'm creating an EMR Cluster cloudformation template which will be used to create EMRs in different regions. Since it's for multiple regions, I'm passing the vpc and subnet options as parameters so ...
1
vote
1answer
78 views

Condition for Cloudformation Resource

So the thing is: I have this resource creation set for AWS Cloudformation using ElasticBeanstalk, which creates additional internal_loadbalancer: Resources: IntLB: Type: AWS::...
0
votes
0answers
19 views

AWS CloudFormation EC2 Template getting failed

I was trying to create a EC2 instance with the existing values in my AWS account. When am validating the template at cloudformation it says valid, after trying to create a stalk it got failed with the ...
0
votes
1answer
87 views

Can we register domain in AWS route 53 via cloudformation?

I am new Cloudformation and I am trying to find a Cloudformation script to register the domain, say example.com under Route53. I looked at cloudformation pdf and found nothing related to domain ...
0
votes
1answer
69 views

How to specify a Dockerun file for a Docker backed Beanstalk deployment in Cloudformation template

I want to create a Cloudformation template for launching an Elastic Beanstalk application based on the Docker platform. I managed to make manually the setup, which includes uploading the Dockerrun.aws....
1
vote
1answer
126 views

Tradeoffs for naming DynamoDB tables with CloudFormation

I’m creating some dynamodb tables via CloudFormation, which will be accessed by Python lambdas. It looks like I have two choices in naming the tables — let CF do it, and therefore put a whole bunch ...
0
votes
0answers
122 views

AWS Cloudformation change set is not adding tags to the resources

There is an existing cloudformation stack (for ec2, cloudfront creation) and I want to add tags to the resources. When I am trying to create a change set for the stack, it says no changes detected. ...
0
votes
1answer
155 views

Can't get CloudFormation AutoScalingGroup to work

I'm trying to create an AutoScalingGroup for EC2. I keep getting the following error: Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement The ...
0
votes
0answers
57 views

AWS CloudFormation: how do I append manually defined Environment with a AWS::Include one

I have env var key/value pairs that I pull into my CloudFormation yaml via: Fn::Transform: Name: 'AWS::Include' Parameters: Location: 's3://bucket/myfile.yml' myfile.yml ...
1
vote
3answers
325 views

How to create an route53 record of the Private IP in Cloudformation

I have a cloudformation script in AWS that creates an EC2 instance, with some firewall rules, S3 mappings and other stuff.. and I create a DNS record in route53 for the public ip of the instance, this ...
1
vote
1answer
709 views

how to pull docker image on ECR using cloudformation template

I want to use docker image hosted on ECR and i want to automate the pull operation using cloudformation template. I attached IAM role with ECR full access to ec2 instance and it doesn't work. i am ...
0
votes
1answer
296 views

creating new SSH user in ubuntu ec2 instance using cloudformation template userdata

I want to create new ssh user that can access instance using cloudformation template userdata. i am using this json script "sudo adduser jenkins-user --disabled-password\n", "sudo su - jenkins-user\...
0
votes
1answer
26 views

Cloudformation list IAM Policies

Can you dynamically list IAM Polices as a drop down menu within the Cloudformation options? The usual use case for this is adding instance types to a drop down. This is written manually though in all ...
1
vote
1answer
100 views

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 ...
1
vote
0answers
57 views

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 ...
0
votes
0answers
43 views

Cloud computing solution for an autocomplete query

We need to implement an autocomplete field on a website and our team is deciding if we'll implement from scratch or if we'll use a cloud solution due to performance issues. The idea looks simple, we ...
0
votes
0answers
113 views

Cannot run Ansible Tower Cloudformation template

Cross posting from stackoverflow since I didn't get any love there I'm currently following Ansible Tower Quick Start guide on Amazon AWS. Basically it loads an Amazon-hosted CloudFormation template ...
0
votes
1answer
124 views

How to display a drop-down list of RDS instance snapshot ID's when creating a new stack from a template?

I wrote a CloudFormation template which in addition to other stuff, also creates a RDS MySQL instance and restores data from a previously backed up DB instance snapshot. I want to enable the user ...
1
vote
0answers
51 views

Cloudformation Template showing all nested changing with Null Changes

For some reason, whenever we create a changeset, it shows that all nested resources will change but with a target of null and a null causing entity: e.g. { "resourceChange": { "...
0
votes
1answer
444 views

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 ...
1
vote
1answer
164 views

AWS Cloudformation condition on List

We have a map which list all instance type with EBSOpt (Ebs-optimized supported) Flag e.g "p2.16xlarge" : { "EBSOpt" : "True" }, The problem here is we have to update this map whenever new ...
0
votes
1answer
26 views

How to expand security groups mapping in order to add another level per region in a CloudFormation template?

I've wrote a CloudFormation template which creates an AutoScaling Group which in turn starts up servers per environment. Up until today the company has been working in region us-west-2 and the ...
1
vote
0answers
211 views

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 ...
1
vote
0answers
73 views

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 ...
0
votes
1answer
63 views

Ansible AWS Cloudformation Create EC2 instance. I can't add quotes to the security group ID

I've searched as much as I can and tried loads of different options to get this to work, but I'm completely stuck. From an Ansible script, I'm creating Cloudformation stacks that consist of a network ...
1
vote
1answer
39 views

AWS NIC Cloudformation and Tagging

Is it possible to tag the embedded NIC in AWS with cloudformation? If not, is it possible to disable the embedded NIC and create a new resource and attach the NIC to the instance as ID 0 or the only ...
0
votes
2answers
110 views

CloudFormation, networking issues with RDS and Lambda's

Been trying to get an HTTP enabled Lambda to connect to an RDS database, fetch the results and return to the caller. I'm getting all sorts of timeouts and it's driving me insane. I've never really ...
0
votes
1answer
620 views

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 ...
0
votes
0answers
10 views

Saving a re-usable block in a cloudformation template

I have a hostfile that I want to push into all the AWS::EC2::Instance resources using the string: (Using YAML, not JSON) Resources: InstanceName: Metadata: AWS::CloudFormation::Init:: ...
0
votes
1answer
649 views

Empty value in Mappings

In my Cloudformation template I want to use an empty value: Mappings: DomainEnvironmentPrefix: stag: prefix: staging. prod: prefix: I am getting this error and it's obvious ...
0
votes
0answers
18 views

How do I prevent errors about duplicate DNS entries when deploying AWS CloudFormation templates to multiple regions?

I'm deploying an NS Route53 entry as part of a CloudFormation stack, which is pointing at a PowerDNS server (that is also deployed in the stack). The stack also creates an A record that has the IP of ...
0
votes
1answer
129 views

Shutdown old EC2 instances only after creating new one in when changing ECS host ami in autoscaling group

Here is my LaunchConfiguration of my AutoScalingGroup in my ECS-Cluster - using cloudformation. UpdatePolicy: AutoScalingRollingUpdate: MinInstancesInService: 1 MaxBatchSize: 1 ...
1
vote
1answer
366 views

How to add ALB Rule to existing Serverless template

So I am trying to add a rule for /synchrony/* which would point to the 'synchrony' target group. Here is my existing template. ConfluenceALB: Properties: Scheme: internal SecurityGroups: ...
1
vote
2answers
620 views

AWS Cloudformation: AWS Certificate Manager To import SSL

Can you import an existing certificate using ACM to be used by your LoadBalancerListener via CloudFormation? On ACM FAQ, it does not tell it can be done on cloudformation concerning the importing of ...
1
vote
1answer
758 views

CloudFormation template: how to use Sub and GetAtt at the same time in short form?

I'm using yaml. So, we can use either: !GetAtt [ WebServer, AvailabilityZone ] !GetAtt WebServer.AvailabilityZone Also, we can use: !Sub 'sometext-${AWS::StackName}' how can I use GetAtt output ...
0
votes
1answer
204 views

Managing dependencies with CloudFormation and CFN-SIGNAL

This might get a bit convoluted but I'll try to simplify. I have a CloudFormation template setting up 3 identical EC2 machines, and using cfn-init in the UserData script it pulls some automation code ...