Stack Exchange Network

Stack Exchange network consists of 175 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
votes
0answers
9 views

Autoscaling in dynamodb though cloud formation doesn't fallback after manual intervention

I have autoscaling configured in one of my dynamoDB table which is deployed through cloudformation. Once I have disabled the autoscaling though the console. Now when i deploy (update) the autoscaling ...
0
votes
1answer
23 views

How to dynamically add users clause in CloudFormation::Init (or, how to programmatically set template keys)

The AWS::CloudFormation::Init documentation allows the specification of users to be created on ec2 instances, thusly: "users" : { "myUser" : { "groups" : ["groupOne", "groupTwo"], ...
0
votes
1answer
36 views

Can I use existing AWS IAM role to create S3 bucket via Cloudformation template?

I want to create a S3 Bucket via CloudFormation template. I found there is a way to do it for EC2 instance on this link. Do we have a way to create S3 bucket using existing IAM role via ...
2
votes
1answer
475 views

How to launch a server in an ASG behind a LB and deploy code on it via cloudformation?

I am trying to create a quite simple infrastructure for DEV environments. Given restrictions are: One ec2 instance only, based on standard ec2 linux nginx server in Docker container serves ...
0
votes
0answers
42 views

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

How to assign a private IP dynamically generated with AWS Cloudformation?

I have an AWS Cloudformation, and I want two EC2 instances A and B on a private subnet under the same VPC. In the application, I need A to access B. How can I configure A with the dynamically ...
2
votes
1answer
101 views

Cloudformation intrinsic function Fn::Sub mapping

I don't understand why Fn::Sub in this template is not working. I get the following error: Template contains errors.: Template error: One or more Fn::Sub intrinsic functions don't specify expected ...
1
vote
0answers
60 views

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
32 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
70 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
26 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
42 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 ...
8
votes
1answer
394 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
86 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
48 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
136 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
80 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
220 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
77 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
54 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
159 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 ...
4
votes
1answer
52 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
107 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
452 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
30 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
49 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
64 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
74 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
1k 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
62 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
88 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. ...
1
vote
1answer
357 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
208 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
284 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 ...
1
vote
1answer
178 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
276 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
276 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
368 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 ...
2
votes
3answers
875 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
505 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
56 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 ...
2
votes
2answers
241 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
96 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
207 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
80 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
1k 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
321 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
30 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
456 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 ...