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

Filter by
Sorted by
Tagged with
1 vote
1 answer
845 views

Discover private DNS of load balancers in Cloudformation

This is a pretty common issue but I am having trouble finding a proper answer to how to go about this. I have two apps, which will run on EC2s. These apps will be in their separate autoscaling groups,...
madu's user avatar
  • 153
2 votes
0 answers
3k views

Can't delete User Pool Domain when Cognito User Pool already deleted

I deployed a CloudFormation template that sets up a Cognito User Pool and an associated User Pool Domain. As there was a misconfiguration in the template a rollback was triggered. The rollback ...
Norman's user avatar
  • 121
2 votes
1 answer
231 views

Failed to connect instance with ALB

I'm trying to build a system like this one: I can't connect to the Instance in private public through ALB. I checked my cloudformation code several times and still couldn't find problem. Please help ...
Kitakado's user avatar
1 vote
1 answer
146 views

Can't connect to the instance in private subnet through a ALB

I would like to build a simple AWS structure just like the picture. But I failed to connect the instance by using tera term. I checked everything but cannot find anything wrong, can someone please ...
Kitakado's user avatar
6 votes
1 answer
9k views

Adding an existing security group CloudFormation EC2 template

Instead of having to set ingress and egress rules, how do I reference existing EC2 security groups in a CloudFormation Template? Resources: EC2Instance: Type: AWS::EC2::Instance ...
rumplesmyboy's user avatar
0 votes
0 answers
64 views

AWS easy way to provision a new database on an existing RDS (MariaDB) instance

I have a greenfields account, with a bunch of stacks I've built a-top of it. Now, I have no existing EC2 instances, however while "in this state" I want to connect to my existing RDS MariaDB instance ...
STOIE's user avatar
  • 1
0 votes
1 answer
553 views

How to include sticky session in AWS Elastic Beanstalk using Cloud Formation template

As I searched for the stickiness in Elastic Beanstalk I didn't find the way how to include it using AWS Cloud Formation. Can anyone help me to do that thing. Thanks in advance.
Gayathri K's user avatar
2 votes
0 answers
377 views

Cloudformation for Kinesis Firehose delivery into Redshift

I am building a Kinesis Firehose Delivery Stream that will stream into Redshift. This process has an S3 bucket as an intermediary. The Cloudformation docs for AWS::KinesisFirehose::DeliveryStream ...
JDS's user avatar
  • 2,628
1 vote
1 answer
140 views

AWS cloud formation what should be excluded

We currently have a web UI configured infrastructure that I want to move to cloud formation as it is growing in complexity. We use ECS with multiple docker containers, RDS, load balancers, SNS etc. ...
Steve 's user avatar
  • 13
0 votes
1 answer
463 views

Update the software in a EC2 instance with CloudFormation update process

I wonder if there's any way to update the software inside the instance. I mean, I've a software running in EC2, I deploy the software with a CF template. That template has a parameter with the ...
nordri's user avatar
  • 1
2 votes
1 answer
299 views

AWS CloudFormation Template for Jupyter

When reading the instructions for setting up a CloudFormation Template in Creating and Using a Jupyter Instance on AWS, I find the following modification difficult. "AWSRegionArch2AMI" : { "ap-...
GNUSupporter 8964民主女神 地下教會's user avatar
2 votes
2 answers
367 views

How can I bulk update CloudFormation stacks while keeping the parameters unchanged?

Let's say I have a number of CloudFormation stacks created from the same template. After making changes to the template, I want all stacks to be updated to the new version of the template. I have ...
User not found's user avatar
1 vote
0 answers
2k views

How to expose multiple ports on one container in AWS behind ALB

The whole application consists of two servers (RabbitMQ and Tomcat) and a DB running behind ALB. For the time being there will be only one RabbitMQ instance and one Tomcat instance however the set up ...
user2134216's user avatar
2 votes
2 answers
5k views

AWS CloudFormation: Internal Failure. Rollback requested by user

I am creating a stack via the AWS Ruby SDK v3 and it is failing with an internal error. After a long period of time (30-40 minutes) it fails and rolls back with an internal failure. No resources show ...
hellomynameisjoel's user avatar
0 votes
1 answer
493 views

How do I add storage with cloud templating?

I have a CloudFormation template to spin up an EC2 instance. Parameters: InstanceType: Type: String Description: Instance type for RStudio. Default is t2.micro. AllowedValues: - ...
goollan's user avatar
  • 113
4 votes
2 answers
6k views

How to fix / why are Conditions causing Unresolved resource dependencies

Edit Original details below. In the process of chasing this down, I've now narrowed it down to the fact that this security group DatabaseSecurityGroup: Type: AWS::EC2::SecurityGroup ...
philolegein's user avatar
3 votes
2 answers
707 views

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: ...
user2134216's user avatar
20 votes
2 answers
34k views

How to upload a file into S3 bucket using CloudFormation script?

How do I upload a file into my AWS S3 bucket CloudFormation template? AWSTemplateFormatVersion: '2010-09-09' Resources: S3Bucket: Type: AWS::S3::Bucket Properties: AccessControl: ...
Ayushi Garg's user avatar
1 vote
0 answers
95 views

Not able to deploy Openshift on AWS using QuickStart Guide

Thanks for your support. I am trying to deploy the Open-shift on aws using AWS Quickstart guide, as mentioned here. My deployment is gets Rollback as it is unable to deploy below resources: ...
ajay's user avatar
  • 47
0 votes
1 answer
297 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"], ...
philolegein's user avatar
0 votes
1 answer
653 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 ...
Chandan Kumar's user avatar
2 votes
1 answer
1k 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 ...
hey's user avatar
  • 347
6 votes
2 answers
10k 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 ...
Niklas Rosencrantz's user avatar
1 vote
1 answer
601 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 ...
oleiba's user avatar
  • 121
5 votes
2 answers
11k 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 ...
titus's user avatar
  • 414
1 vote
0 answers
390 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 ...
JonTroncoso's user avatar
1 vote
1 answer
632 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::...
shantanuo's user avatar
  • 3,619
1 vote
1 answer
699 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 ...
domdambrogia's user avatar
1 vote
2 answers
146 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 ...
danodonovan's user avatar
9 votes
1 answer
2k 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 ...
domdambrogia's user avatar
7 votes
1 answer
3k 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 ...
gene_wood's user avatar
  • 555
1 vote
1 answer
628 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 ...
aroN's user avatar
  • 75
3 votes
1 answer
4k 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 do I have to specify to get public IP. (Here myec2 is where I described my ...
aroN's user avatar
  • 75
0 votes
1 answer
121 views

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

Sometimes CloudFormation can be too "complicated". Which cases should CloudFormation win over Terraform?
titus's user avatar
  • 414
5 votes
3 answers
4k 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 ...
CodeChimp's user avatar
  • 343
0 votes
1 answer
148 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 ...
cyclopsmart's user avatar
3 votes
1 answer
5k 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 ...
Martin Brown's user avatar
4 votes
1 answer
165 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 ...
Lidor Ettinger's user avatar
-2 votes
1 answer
424 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 ...
apoorvanand's user avatar
0 votes
2 answers
4k 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" : { ...
Itai Ganot's user avatar
  • 10.8k
0 votes
1 answer
123 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::...
ryekayo's user avatar
  • 472
1 vote
0 answers
105 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 ...
Cohaven's user avatar
  • 51
1 vote
0 answers
228 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 ...
user2584960's user avatar
5 votes
1 answer
8k 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 ...
theillien's user avatar
  • 449
0 votes
1 answer
244 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 ...
theillien's user avatar
  • 449
1 vote
1 answer
879 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. ...
DylanSp's user avatar
  • 83
2 votes
1 answer
2k 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 ...
Kannan AnandaKrishnan's user avatar
2 votes
1 answer
768 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::...
DaWe4444's user avatar
  • 131
5 votes
2 answers
2k 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 ...
Dave's user avatar
  • 181
2 votes
1 answer
625 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....
pablochacin's user avatar