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.

Filter by
Sorted by
Tagged with
3 votes
1 answer
8k 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 ...
kenorb's user avatar
  • 7,841
4 votes
1 answer
1k 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 ...
Milister's user avatar
  • 175
0 votes
2 answers
2k 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 ...
kenorb's user avatar
  • 7,841
16 votes
6 answers
49k 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 ...
kenorb's user avatar
  • 7,841
-3 votes
1 answer
477 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 ...
salih's user avatar
  • 101
3 votes
1 answer
52 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 ...
hawkeye's user avatar
  • 1,143
3 votes
3 answers
4k 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 ...
hawkeye's user avatar
  • 1,143
5 votes
2 answers
249 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 ...
Parantap Parashar's user avatar
1 vote
1 answer
86 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 ...
codeclue's user avatar
  • 111
5 votes
1 answer
77 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 ...
mkholod's user avatar
  • 51
4 votes
1 answer
2k 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) ...
SuperSaiyan123's user avatar
5 votes
1 answer
293 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 ...
ryekayo's user avatar
  • 151
6 votes
3 answers
217 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 ...
user2640621's user avatar
  • 1,395
2 votes
2 answers
272 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:/...
fbielejec's user avatar
  • 183
9 votes
2 answers
693 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 ...
hawkeye's user avatar
  • 1,143
9 votes
6 answers
1k 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 ...
Missus's user avatar
  • 93
2 votes
0 answers
43 views

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

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 ...
Austin Shin's user avatar
4 votes
2 answers
2k 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 ...
Subrat Srivastwa's user avatar
6 votes
4 answers
393 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 ...
EDU_EVER's user avatar
  • 121
4 votes
3 answers
119 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 ...
Nyx's user avatar
  • 143
6 votes
2 answers
221 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 ...
Ameen Ibrahim Raffic - 'AIR''s user avatar
4 votes
1 answer
917 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 { ...
Alexander Nekrasov's user avatar
5 votes
5 answers
2k 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 ...
Adonis's user avatar
  • 153
6 votes
3 answers
598 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 ...
lakshayk's user avatar
  • 636
4 votes
1 answer
4k 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, ...
Yossale's user avatar
  • 141
3 votes
2 answers
2k 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. ...
Evgeny Zislis's user avatar
4 votes
1 answer
627 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 ...
Paul's user avatar
  • 141
5 votes
2 answers
217 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 ...
Evgeny Zislis's user avatar
9 votes
2 answers
4k views

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

Some background: I've created a moderately complex network using Amazon's vpc. It's a three-tiered network across two availability zones. Each layer has a subnet in zone-a and zone-b. The ...
David Meents's user avatar
3 votes
1 answer
35 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 ...
hawkeye's user avatar
  • 1,143
3 votes
1 answer
1k 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 ...
hawkeye's user avatar
  • 1,143
5 votes
4 answers
3k views

How can I get a list of encrypted disks for instances that are running on the AWS CLI?

There is a great question here about how to get a list of encrypted disks. I'm currently using the describe-volumes command. For the record I'm currently using: aws ec2 describe-volumes --region us-...
hawkeye's user avatar
  • 1,143
4 votes
2 answers
165 views

What is the simplest way to list which attached disks are encrypted (and which not) on AWS?

An auditor is asking for proof that we've encrypted all the disks on our AWS EC2 VPC. I'd like a way to list all the disks and whether they're encrypted or not. I know I can build a report with the ...
hawkeye's user avatar
  • 1,143
16 votes
3 answers
2k views

How to check AWS spot pricing automatically?

I've been thinking about a Jenkins job to check the pricing for the agent boxes we spin up; every so often the price spikes and it'll be an hour or two before anyone notices that no new agents are ...
Alex's user avatar
  • 4,522
34 votes
4 answers
11k views

Why is the AWS EC2's spot price greater than the on-demand price?

I was trying to provision spot instances via Ansible yesterday, and almost all my requests failed, even when I put my spot price == the on-demand price of that instance. So, when I had a look at the ...
Dawny33's user avatar
  • 2,816
28 votes
5 answers
12k views

How to clean up orphaned AWS EC2 snapshots?

We end up with a fair amount of AWS EC2 snapshots where the AMI has been deleted, but the snapshot is left behind to rot. I'd like a non-manual way of identifying and deleting these orphans to save us ...
Alex's user avatar
  • 4,522
7 votes
1 answer
329 views

How to automate submission to Amazon Marketplace?

Is anyone aware of a way to automate the submission of an AMI to Amazon's Marketplace? I want to take a public AMI and share it to the AWS Marketplace so it can be scanned for listing and then submit ...
lawnmowerlatte's user avatar
14 votes
1 answer
724 views

How do you manage your inventory of spot instances on AWS with Ansible

I am new to Ansible, with some experience in Chef. I am considering learn and use Ansible to manage environments. I was wondering, what would be the best practice to manage inventory of AWS spot ...
Berlin's user avatar
  • 780
14 votes
4 answers
9k views

How to increase the size of a disk on a running instance on Amazon EC2

I got a running instance of a EC 2 server setup with Ubunto. What's the best way to increase the disk size without any downtime and minimal risk? Reading through the guides, one way would be to ...
googletorp's user avatar
4 votes
1 answer
614 views

How to terminate EC2 instance in Jenkins via Vagrant when job is stopped manually?

I've freestyle jobs which aims to run EC2 instances via Vagrant (vagrant up), however when I cancel the job manually (by clicking X button), the instances on EC2 are still running. How can I make sure ...
kenorb's user avatar
  • 7,841

1 2 3
4