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-ec2]

For questions about using Amazon Elastic Compute Cloud in DevOps, including deploying, monitoring and scaling applications in EC2. For questions specifically about monitoring EC2 with [aws-cloudwatch] use that tag. For the EC2 container service use the [amazon-ecs] tag.

1
vote
0answers
22 views

AWS ECS/EKS: EC2 vs Fargate mode

Amazon offers the option of launching their container management services ECS and EKS in two modes: EC2 and Fargate. In the former, normal VMs (EC2 instances) are used and ECS or EKS (depending on ...
0
votes
0answers
35 views

ECS task fails to start when deploying Docker multi container App in Elastic beanstalk

I have a beanstalk application environment that use multi container docker instances.I have also pushed an image(simple app running a simple node js) to my ECR repository.But whenever i try to ...
1
vote
1answer
32 views

Why don't the instances in the auto-scaling group get assigned public ip addresses unless it's a default vpc?

I'm trying to migrate our deployment process over to aws code deploy (by following instructions here:https://pionect.nl/autoscaling-aws-laravel-codedeploy-opsworks-chef-automation/). When I'm ...
1
vote
1answer
37 views

Is running load balanced autoscale apps cheaper on AWS Kubernetes than just using EC2 resources?

We're running like 100+ servers on AWS EC2 with like 20 microservices all load balanced and autoscaled with 2 to 3 instances. The cost has become....very significant. I'm wondering if migrating ...
0
votes
1answer
14 views

I have an custom AMI and want to run certain config commands at initial boot, depending on the autoscale instance that starts it. How do I do this?

I have a custom AMI that contains the dependencies for several applications. The only difference between the applications is several configuration options that can be configured by a bash script. (i....
2
votes
1answer
37 views

AWS: Application vs Classic Load Balancer

My senario is this: I am using 2 EC2 instances which I want reachable via urls as follows: sub1.domain.com sub2.domain.com I am aware of the fact that AWS Application Load Balancers currently ...
-2
votes
2answers
46 views

Why does amazon charge for free tier usage?

I have an issue with amazon free tier account, I have deployed two EC2 instances (1 linux and 1 windows) on amazon each having 30GB of storage which is permissible under free tier, these instances are ...
0
votes
0answers
19 views

ACM SSL certificate with Elastic Beanstalk

We switched from Comodo wild-card SSL CA to a free version from AWS through the Certificate Manager. The domain is registered on Namecheap and the only way we could get the website to route traffic ...
1
vote
0answers
30 views

Preventing an IAM user from overriding launch template parameters on RunInstance

I'm trying to set up an IAM policy that allows a user to run an instance (ec2:RunInstances), but only from a specific launch template - and without making any changes to that launch template's ...
-1
votes
1answer
37 views

Make instance with newuser by terraform

I want to make new instance with "user1" rather than ec2-user(AWS) default.i want achieve this by terraform. Like in azure terraform it can be done by "os_profile{}", but how can i do in aws by ...
0
votes
1answer
33 views

Way to Connect to all ec2-instances one by one

Is there any way through which I can connect to all ec2-instances one by one through Python script to extract some server information from there. Please note that all ec2-instances lies behind a ...
0
votes
1answer
37 views

Amazon Web Service (AWS): Spot request active followed by cancelled terminating

5/31/2018, 5:21:51 PM fleetRequestChange cancelled 5/31/2018, 5:15:46 PM fleetRequestChange cancelled_terminating 5/31/2018, 5:15:46 PM fleetRequestChange active 5/31/2018, 5:15:...
1
vote
1answer
56 views

does boto3 have a way to get resource limits from a region?

Right now I am looking for ec2 instances type limits for a given region. I would like to put in place an audit script that tracks our usage vs our limits for a given set of things. Also open to ...
2
votes
0answers
119 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 ...
1
vote
1answer
281 views

How to set an existing IAM role to a new instance while spinning in terraform?

I am trying to attach an existing role created in AWS, but I am not able to add it in Terraform Code. I tried to add the role in instance profile but it didn't work either for me. Is there any direct ...
1
vote
1answer
117 views

Terraform: ignore_changes conditionally? (temporary EC2 instance public IP address)

I've got a couple of EC2 instances managed by Terraform, with public IP addresses in a VPC. With each Terraform run, I'm updating DNS records based on those public IPs. I don't need these instances ...
3
votes
2answers
109 views

How to find out the used Key pair name via AWS CLI?

I'm aware of get-password-data command which can display PasswordData data like: $ aws ec2 get-password-data --instance-id i-0123456789 { "InstanceId": "i-0123456789", "PasswordData": "\r\...
5
votes
2answers
82 views

How to automate rolling upgrades for ec2 running linux behind elastic and/or application load balancer?

Would like to ask for recommendations on ready automated solutions or templates for rolling ec2 instance upgrade on AWS, requiring a reboot with ELB/ALB. Specifically required to perform the ...
1
vote
1answer
334 views

How to export EC2 snapshot into S3 bucket?

I've created a snapshot of EC2 instance via: aws ec2 create-snapshot --volume-id vol-xyz In aws ec2 create-snapshot help we can read: Creates a snapshot of an EBS volume and stores it in Amazon ...
5
votes
1answer
209 views

Create multiple EC2 instances using python script (in loop iteration)

I Have JSON file in which email address and count of instances are specified.I'm using python script to iterate through that file and get username/count number (count number will be used as number of ...
0
votes
2answers
170 views

How to get instance's route table id using CLI?

I'd like to find a route table id associated with the given EC2 instance. How can this be achieved using AWS CLI? I've tried to use aws ec2 describe-vpcs, but the route tables are not there. I'm ...
3
votes
2answers
1k views

How to run a script or a command on EC2 instance via AWS CLI?

According to New EC2 Run Command news article, AWS CLI should support a new sub-command to execute scripts on remote EC2 instances. However I've checked in aws ec2 help, but I can't find the relevant ...
-3
votes
1answer
136 views

How much it will cost for AWS for deploying a inventory management application [closed]

I am developing an inventory management application i want to use AWS EC2 . which will have 10-15 users and storage about 2GB .as a newbie i could not understand the pricing can somebody help me how ...
2
votes
1answer
28 views

How to track (non ECS) container costs on EC2?

I've been evaluating Netflix Ice - as a billing tool - but it appears to only work at the Machine instance level - not at the container level. I'm looking for a tool to help generate billing reports ...
1
vote
2answers
414 views

What is the AWS user permission that allows attaching and detaching IAM Roles to instances?

My coworker is trying to attach IAM roles to EC2 instances and doesn’t have permissions. I’m trying to work out which permissions to give him. My question is: What is the AWS user permission that ...
6
votes
2answers
109 views

What should I use for configuration management on AWS?

I am trying to find a solution for configuration management using AWS OpsWorks. What I can see is AWS offers three services for OpsWorks Chef Automate Puppet AWS stacks I have read basics of all ...
1
vote
1answer
39 views

Application monitoring in multiple EC2 instances

I am running 10 AWS EC2 instances. Each of them running different applications. I am looking for application level monitoring solution. Suppose, if Apache fails in any instance, it should notify me ...
5
votes
1answer
61 views

Large number of host emulation

What would be the best way to emulate (or really to instantiate) a large number of hosts / virtual machines / docker containers in the cloud? Assume I want to run a scenario where 10,000 hosts are ...
4
votes
1answer
245 views

Unable to launch multiple EC2 instances in different availability zones using terraform

Whenever I try to launch the instances, I am getting the following error message. Please help with this. Error: Error applying plan: 3 error(s) occurred: * aws_instance.example[0]: 1 error(s) ...
5
votes
1answer
76 views

Approaching user adds and edits with Ansible

I am going to be attached to a small project that basically organizes the users in a cluster of AWS Linux servers. The servers users assigned have different UIDS and maybe different GUIDs. I am hoping ...
5
votes
3answers
68 views

Autoscaling on GoCD agents without terminating active builds?

At the moment I have an AutoScaling Group (ASG) of GoCD build agents without any scaling policies. I have created some custom metrics that indicate how many build agents are currently idle and I'd ...
2
votes
2answers
70 views

Nginx /foo and /foo/ redirects

I want both http://domain/foo and http://domain/foo/ requests to serve a given resource. Here's the relevant part: location / { rewrite /(.*) /ipns/QmdpoFuwY/$1 break; proxy_pass http:/...
5
votes
1answer
113 views

Is Azure's confidential computing essentially encrypted RAM?

I'm trying to wrap my head around the Azure confidential computing offering. It appears that that AWS does not offer encryption at the application level (see diagram for what I mean by this:) My ...
9
votes
6answers
347 views

How to prevent hug of death on EC2 Instance?

I've a iOS app on the app store and recently I've received a huge surge of traffic to my landing page hosted on EC2 and resulted in the page not responding, luckily I managed to recover it by ...
1
vote
0answers
33 views

What are some ways of persisting volumes when dealing with spot instances for R/D purposes?

I do R&D work on spot GPU's on AWS and have been, so far, launching them from a 50GB AMI that I create every time I need to shut off the instance. This has been working pretty well, except that ...
4
votes
2answers
215 views

How to create ansible host file on mac?

When I try to create ansible host file as follows: sudo vi /usr/local/etc/ansible/hosts When I try to save the file I get following error: "/usr/local/etc/ansible/hosts" E212: Can't open file for ...
6
votes
4answers
289 views

DevOps practice on AWS instances

I am new to DevOps, started learning the different tools. I would like to practice all of the tools like Jenkins, Chef, GIT, Puppet, Ansible, Docker, Kubernetes, etc . My question is If I would like ...
3
votes
3answers
60 views

Ideal methods of handling server logs on AWS

We currently have some ruby applications hosted on EC2 servers on AWS, and every few weeks we see the disk space get completely consumed by the app log as well as the worker logs. What are the best ...
5
votes
2answers
109 views

AWS Spot instances price

While trying to create spot instances I notices that the Price for almost all instance types (from m3 , c3, c4) are always higher than the On-Demand price of corresponding variants in us-east-1c and ...
2
votes
0answers
377 views

How to provide multiple configs for EC2 node using Terraform and cloud-init?

I need to use several configs on my EC2 node using Terraform. data "template_cloudinit_config" "puppetserver_config" { gzip = true base64_encode = true part { ...
5
votes
5answers
334 views

Bad edit to sudoers file on EC2 instance, how to fix it?

While writing a script to edit the sudoers file without using visudo, the script did not check for issue, and I have introduced some bad edits into the sudoers file, and thus cannot use sudo at all ...
6
votes
3answers
123 views

Continuously getting locked out from EC2 instance. No supported authentication methods available

I am getting continously locked out from my ec2 instance time and again. I have to take its root volume and attach it to some other instance (mostly new instance) to prevent data loss. I am not able ...
2
votes
1answer
666 views

How to get EC2 instance tags when pulling CloudWatch data?

For monitoring purposes, we're pulling AWS/EC2 instances statistics data from CloudWatch and save it to InfluxDB. We're using Telegraf to do this. However, when pulling the data from Cloudwatch, ...
2
votes
1answer
181 views

What is the best way to find the Auto Scaling Group of an ECS cluster?

We are looking to inspect the ASG EC2 CloudWatch metrics such as CPU and Memory, since it includes an aggregate of all the ASG instances. Given that we know the ECS cluster, or the ECS service name. ...
4
votes
1answer
282 views

AWS Storage Cost for a custom AMI

How does AWS calculate the cost of a custom AMI? If I would create an AMI which is based on Ubuntu 16.04, do I need to pay for the complete size of AMI (e.g. 4GB) or just the differences of my custom ...
5
votes
2answers
116 views

How to scale-down in a multi-tenant environment?

Cloud environments in AWS allow for multi-tenancy managed by the user himself, classic example are container orchestrators such as ECS or Kubernetes. When you have two services, one needs memory ...
1
vote
0answers
161 views

How to get eth1 ENI on AWS Instance to Respond to NodePort Requests?

Kubernetes 1.5 cluster running in AWS. Node1 (worker) has an additional network interface assigned to it with a static IP, so if you run "ip addr show" on the node you see eth0, eth1, and the gang of ...
5
votes
2answers
1k views

Application calling AWS internal load balancer in same subnet is timing out

Thanks for taking the time to help me with this. I've lost count of how many days I've spent banging my head against this problem and I'm stuck at a dead end. Some background: I've created a ...
2
votes
1answer
21 views

What is the ec2 cli command to modify the minimum number of nodes in a scaling group?

I've got an ec2 autoscaling group that starts in the morning and finishes in the evening. I'd like to create a 'button' that people can click to warm up the autoscaling group to run jobs in the middle ...
3
votes
1answer
738 views

How does using packer and terraform in a CD pipeline compare to docker images built from git?

At work we have a Go CD pipeline for producing docker images, and scheduling docker containers with rancher. This works quite well. You can commit a change to the Docker image in Git, the pipeline ...