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

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

1
vote
0answers
35 views
+100

What is an AWS CodeStar SyncResource?

I used CodeStar to create a DataPipeline that: Downloads code from my github repo Tests it in CodeBuild, Creates/executes a CloudFormation changeset on a CloudFormation stack that CodeStar created ...
1
vote
1answer
27 views

Assign Public IP address to an instance through cloud-formation

This cloud formation template works as per my expectations. But when I enable Private IP address parameter, I get an error. { "Resources":{ "MySpotFleet":{ "Type":"AWS::EC2::...
1
vote
1answer
45 views

Spawn new Aws::AutoScalingGroup instances before old are destroyed. (503 error occuring)

TL;DR: See edit at bottom. I am attempting set up continuous deployments for our new environment we are migrating to at my company. I am using an aws cloudformation stack to contain all of my ...
0
votes
0answers
20 views

What is AWS::ElasticBeanstalk::Ext

Here is snippet from one of cloudformation templates of ElasticBeansTalk environment. AWSEBEIP: Metadata: 'AWS::ElasticBeanstalk::Ext': AutoScalingGroup: AWSEBAutoScalingGroup ...
1
vote
2answers
39 views

Single container jobs on AWS

We would like to launch single Docker container tasks in a versioned and logged - but ad-hoc fashion on AWS. Each container task requires significant vCPU and RAM (maybe 16 vCPU and 64GB RAM). I can ...
0
votes
0answers
42 views

Creating a Listener Rule Redirect from Port 80 to 443 with CloudFormation

Description When trying to create a ListenerRule that redirects 80 -> 443 with CloudFormation, I receive errors. Encountered unsupported property RedirectConfig I would like to automate the entire ...
8
votes
1answer
306 views

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

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

Unable to create rds instance using cloud formation?

Iam trying to create an rds mysql instance using cloud formation.But when iam creating the stack iam getting rollback.Under events the error for creating rds instance is "Encountered unsupported ...
3
votes
1answer
64 views

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 i have to specify to get public ip. (Here myec2 is where i described my instance) ...
1
vote
1answer
75 views

Is it worth bothering writing Cloudformation if Terraform exists? [closed]

Sometimes CloudFormation can be too "complicated". Which cases should CloudFormation win over Terraform?
2
votes
1answer
78 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
62 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
46 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
91 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 ...
3
votes
1answer
39 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
81 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
298 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
23 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
48 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
52 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
58 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
841 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
54 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
82 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
277 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
145 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
2answers
219 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
147 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
206 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
233 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
248 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
94 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
694 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 ...
2
votes
2answers
2k 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
446 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
40 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
197 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
83 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
1answer
187 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
69 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
901 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
265 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
27 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 ...
2
votes
1answer
352 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
98 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
77 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
53 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
157 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 ...
1
vote
1answer
1k 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 ...