Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
128 views

AWS EC2 instance cannot see another instance on a specific port

I have created two EC2 instances using CloudFormation - one for the Apache web-server, another one for the PostgreSQL DB. For some reason the web-server cannot telnet into the DB instance on port 5432 ...
altern's user avatar
  • 195
1 vote
1 answer
2k views

How to Apply Egress rules to Default Security Group - AWS

I would like to apply port 443 outbound rule to the 'Default' security group. It worked by creating a dedicated block OutboundRule (which is commented out). Instead of creating a new block, I want to ...
Prime's user avatar
  • 143
2 votes
3 answers
546 views

How to emit IPv6 address of EC2 instance in the ouputs of a cloudformation stack?

I have AWS cloudformation stacks with ec2 instances that are entirely isolated from external traffic. They seldom need to be directly accessed. For cases when they do need to be accessed, I have a ...
GcL's user avatar
  • 121
2 votes
1 answer
802 views

CWAgent Disk Space Alarms

I'm trying to implement an alarm(in Cloudformation) for disk space free using metrics from the Cloudwatch agent and I'm having issues with devices shuffling DeviceID. I encountered this earlier when ...
wronglebowski's user avatar
2 votes
2 answers
3k views

Create EC2 Instances and Volumes Using CloudFormation

I'm trying to use CloudFormation to deploy two Windows Server 2019 EC2 instances and also attach a new volume to each instance (two instances, two volumes total). I get the following error when I ...
jrd1989's user avatar
  • 718
0 votes
1 answer
774 views

aws blockchain template received failure signal with uniqueid +failed to create ec2 instance for dev

I am learning about How to Deploy Hyperledger Fabric on AWS with Blockchain Templates. from this tutorial https://medium.com/faun/how-to-deploy-hyperledger-fabric-on-aws-with-blockchain-templates-...
Dora's user avatar
  • 341
2 votes
1 answer
256 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
161 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
1 answer
499 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
0 votes
1 answer
320 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
1 vote
1 answer
622 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
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
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
159 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
-2 votes
1 answer
476 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
1 vote
0 answers
111 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
1 answer
2k 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 ...
jedberg's user avatar
  • 2,331
6 votes
3 answers
9k 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 ...
Nani's user avatar
  • 195
0 votes
1 answer
1k 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\...
Nani's user avatar
  • 195
0 votes
1 answer
605 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 ...
gzz's user avatar
  • 123
0 votes
1 answer
799 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 ...
motig88's user avatar
  • 157
1 vote
1 answer
509 views

EC2 instance cross-reference within a CloudFormation template

I'm in a bit of a pickle here. I have a specific application (one that I cannot modify) which I need to automatically deploy on 3 AWS EC2 instances using CloudFormation, and I need all 3 of them to be ...
motig88's user avatar
  • 157
0 votes
1 answer
1k views

Can't connect to via ssh to second NIC on RHEL aws

I want an EC2 host with 2 NICs, one for administration and one for hosting a few server processes. I successfully cloud form'd a host with 2 NICs, each with their own elastic IP. I expect I can SSH ...
Ziplin's user avatar
  • 485
0 votes
0 answers
58 views

Route not being created to NATInstance using CloudFormation

I have this Instance: "NATInstance": { "Type": "AWS::EC2::Instance", "Properties": { "ImageId": "ami-12345678", "InstanceType": "t2.micro", "NetworkInterfaces": [ { "...
Laran Evans's user avatar
1 vote
1 answer
1k views

How to update a running CoreOS instance's user-data through AWS CloudFormation?

I have a running CoreOS instance triggered by AWS CloudFormation. I updated the CloudFormation template via CF designer, but found out that user-data of the existing instance was not updated. Is there ...
zeck's user avatar
  • 121
0 votes
0 answers
251 views

Best practice/way to manage Elasticsearch cluster nodes in EC2 cloud with Ansible

I have to deploy cluster for production environment in EC2 cloud and want to be able to: 1. Remove/Add nodes from/to cluster 2. Assign roles to nodes (dedicated master node, data node, and client ...
antonbormotov's user avatar
1 vote
1 answer
245 views

New instance registering with ELB too soon, how can CI signal if instance provisioning was successful?

I am using CloudFormation template that creates launch configuration and auto scaling group. User data script for this launch configuration calls CI web-hook to deploy application into this instance. ...
arnaslu's user avatar
  • 137
1 vote
2 answers
6k views

How to get public IP of instance in CloudFormation template when using LaunchConfig

I have a CloudFormation template with LaunchConfig. In UserData I need to reference public IP of the instance being created. I wanted to use Fn::GetAtt, but it requires logical name and I'm not sure ...
arnaslu's user avatar
  • 137
-1 votes
1 answer
532 views

Nginx with mod_security on EC2 [closed]

I am looking to get some ideas and see what others are doing in terms of managing/keeping updated Nginx + mod_security on EC2 instances. The catch with this is that mod_security needs to be compiled ...
J Henzel's user avatar
  • 169
3 votes
4 answers
3k views

Is there a way to create AWS autoscaling lifecycle hooks with CloudFormation without a race condition?

I am trying to use AWS autoscaling lifecycle hooks in a template that encapsulates the following things: AWS::AutoScaling::AutoScalingGroup with associated scale up/down policies, launch ...
Alex B's user avatar
  • 1,804
0 votes
0 answers
738 views

UpdatePolicy in AutoScalingGroup failes to update instances

I have used the following settings in the CloudFormation for creating an autoscaling group: "myautoscalinggroup": { "Type": "AWS::AutoScaling::AutoScalingGroup", "UpdatePolicy" : { "...
Arash's user avatar
  • 101
4 votes
1 answer
2k views

Run EC2 instance into specific non-default VPC in random subnet

I have a problem and I expect that someone help me. I'm working with AWS and I have 2 VPC. The default VPC an another VPC created by me. Each VPC has 3 subnets in differents AZ (eu-west-1a, eu-west-...
Gon's user avatar
  • 91
1 vote
3 answers
16k views

Amazon Cloud Formation: Import file from S3 bucket

I am struggling to get files from my S3 bucket to my EC2 instance using cloud formation. I have the following files: "files" : { "/var/www/text.txt": { "source": "https://s3.amazonaws.com/...
Soatl's user avatar
  • 169
1 vote
1 answer
513 views

Amazon linux EC2 from CloudFormation - stop service

I'm running a my service on a Amazon EC2 create from a CloudFormation script. I put service file in /etc/rc.d/init.d/myService. (includeing "start" and "stop" functions). I've also linked it like this:...
Roee Gavirel's user avatar
4 votes
1 answer
8k views

Assigning a public ip to an ec2 in cloudformation?

In the vpc I am using on aws ec2's do not get a public ip address by default. I am trying to add one manually after referencing this and this bit of documentation. Currently my cloudformation ...
Colin Murphy's user avatar
2 votes
2 answers
8k views

AWS Custom AMI not running userdata script

We bake AMI's and lately I have wanted to run some user-data scripts to notify cloud formation when the instance is done booting and put it into service. I am using cfn-signal to do this. On the ...
jjhughes57's user avatar
4 votes
1 answer
1k views

Per-instance alarms inside auto-scaling groups in CloudFormation

Basically what it ways on the tin, how can I create individual per-instance alarms inside an auto-scaling group created with a CloudFormation template? I can reference the ASG itself in an alarm and ...
Alex B's user avatar
  • 1,804
3 votes
1 answer
248 views

How can I get Puppet generated configuration to include internal hostnames of other ec2 instances in my CloudFormation stack?

I have a stack generated by AWS CloudFormation that includes an EC2 instance (running Ubuntu 14.04) and an RDS (database) instance. They are both inside a VPC, which includes a puppet master (not as ...
cubabit's user avatar
  • 45
2 votes
1 answer
8k views

Using Cloud Formation provisioned security group with specific subnet

Summary I'm attempting to create an AWS CloudFormation template which contains an instance for which I want to select a particular subnet. If I specify the subnet ID then I get the following error ...
Friedrich 'Fred' Clausen's user avatar
4 votes
4 answers
17k views

Amazon CloudFormation: How to get an ELB's private IP for a specific subnet?

TL;DR - Is it possible for a CloudFormation template to insert the subnet-specific internal IP address of a specific ELB into the UserData of an instance within that subnet? We have a fleet of EC2 ...
Craig Watson's user avatar
  • 9,770
0 votes
1 answer
525 views

Expand Amazon EC2 HVM root partition

I created a VM with the Amazon AMI HVM. In the partition configuration I changed the default 8GB root partition to something bigger (10 in my example). Once up, I'm trying to resize but it's not ...
Bastien974's user avatar
  • 1,866
0 votes
1 answer
262 views

Cloud Formation init script cfn-init cancellation

I used to Drupal Cloud Formation sample template to create my Drupal based web site. But now every time my EC2 instance reboot Cloud Formation helper script cfn-init reloads original Drupal ...
zontragon's user avatar
  • 275
0 votes
2 answers
2k views

Cloudformation Add Instance to Security Group in Different Region

I have a Cloudformation stack that I create through Jenkins in various Regions. I have a Chef server in one Region with a separate security group. I need new instances created via Cloudformation to ...
Publiccert's user avatar
  • 1,112
27 votes
3 answers
27k views

AWS CloudFormation: VPC default security group

I have a cfn stack that (among other things), creates a VPC, several security groups, and a handful of EC2 instances. It's trivial to assign security groups that are created within the stack to ...
EEAA's user avatar
  • 110k
22 votes
3 answers
16k views

Is it possible to force Re-creation of EC2::Instance or RDS::DBInstance in amazon cloudformation?

It's possible to force the re-creation of a EC2 or RDS instance using cloudformation stacks? My stack goes stuck in a point where simply destroying and creating the resource will fix it, instead of ...
theist's user avatar
  • 1,259
1 vote
1 answer
2k views

Cloud formation - updating a stack behind an elb doesnt update the AMI

We are powering our AWS EC2 instances using cloud formation. We have 3 different stacks - testing, staging and production. Our workflow to update the images for any of the stacks is as follows: ...
Rob Squires's user avatar
2 votes
1 answer
4k views

Cloudformation Ephemeral (Instance) Storage for instance

I am trying to launch an EC2 Instance with CloudFormation that uses ephemeral / instance storage rather than EBS. I have managed this with Opsworks - so that in the EC2 management window "root device"...
paulecoyote's user avatar
2 votes
1 answer
2k views

Is there an elegant way to shutdown and delete instances?

I have recently been recently using Amazon's CloudFormation to launch instances of EC2 Ubuntu machines running MongoDB. When it comes to deleting the stack it often fails I guess due to not being ...
paulecoyote's user avatar
2 votes
1 answer
1k views

How to get the correct hostname when using ElasticIP in a CloudFormation template

I am using an elastic ip in a CloudFormation template "ServerEIP" : { "Type" : "AWS::EC2::EIP", "Properties" : { } }, Later on I have an EC2 Instance "Server" : { "Type" : "AWS::EC2::Instance",...
centic's user avatar
  • 221