Questions tagged [amazon-ec2]

Amazon EC2 stands for "Amazon Elastic Compute Cloud". It is a part of Amazon Web Services (AWS) and allows users to rent virtual machine instances. You can create instances, launch and manage them through a central interface, through a web API or through a console.

Amazon EC2 is a part of Amazon Web Services (AWS) and allows users to rent virtual machine instances. You can create instances, launch and manage them through a central interface, through a web API, through a console, or by using an Infrastructure as Code tool like terraform

Generally, EC2-related questions on StackOverflow should be about the EC2 API or other programming-oriented topics. Questions about EC2 networking, OS-level issues, cost, etc. should be asked on ServerFault instead.

Resource

  1. Instance types
  2. Pricing
  3. Documentation
  4. Discussion Forum
36510 questions
69
votes
2 answers

Celery: WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL)

I use Celery with RabbitMQ in my Django app (on Elastic Beanstalk) to manage background tasks and I daemonized it using Supervisor. The problem now, is that one of the period task that I defined is failing (after a week in which it worked properly),…
daveoncode
  • 18,900
  • 15
  • 104
  • 159
68
votes
9 answers

import error django corsheaders

i am a beginner in django. i am doing project based on it. project has two stages. i completed first phase and uploaded the code to amazon ec2 instance. after completing second phase i added some packages like python-social-auth,…
shebeer
  • 683
  • 1
  • 5
  • 5
67
votes
3 answers

Amazon EC2: Ubuntu(PV) or Ubuntu(HVM)

I am about to launch Ubuntu instance on Amazon EC2. I'm choosing between PV and HVM options. I found that PV does provide a more efficient virtualization model though I could be wrong and as Amazon offers both options I'm suggesting that HVM may…
alexxjk
  • 1,681
  • 5
  • 18
  • 30
66
votes
5 answers

Unable to growpart because no space left

I'm running an AWS EC2 Ubuntu instance with EBS storage initially of 8GB. This is now 99.8% full, so I've followed AWS documentation instructions to increase the EBS volume to 16GB. I now need to extend my partition /dev/xvda1 to 16GB, but when I…
llamarama
  • 835
  • 1
  • 6
  • 11
66
votes
1 answer

Name an EC2 Instance in the CloudFormation template?

I have a template that works and generates a stack but I cannot find a property to set or something else that allows me to give a Name to the EC2 Instance I have created. When it is generated the Name is blank.
A.G.
  • 2,089
  • 3
  • 30
  • 52
65
votes
4 answers

How to get the region of the current user from boto?

Problem: I'm trying to get the region of the authenticated user from boto3. Use case: I'm working on adding cache to https://github.com/pmazurek/aws-fuzzy-finder. I would prefer to cache the result on per-region basis. This package uses boto to get…
Piotr Mazurek
  • 1,083
  • 1
  • 8
  • 14
65
votes
5 answers

Should I persist images on EBS or S3?

I am migrating my Java,Tomcat, Mysql server to AWS EC2. I have already attached EBS volume for storing MySql data. In my web application people may upload images. So I should persist them. There are 2 alternatives in my mind: Save uploaded images…
enesness
  • 3,123
  • 5
  • 31
  • 33
64
votes
7 answers

Can't delete AWS internet Gateway

I created an internet gateway in AWS VPC dashboard, I attached it to a VPC then I want to detach it but I keep getting this error: Network vpc-xxxx has some mapped public adresses, Please unmap those public addresses before detaching the gateway. (…
Souad
  • 4,856
  • 15
  • 80
  • 140
64
votes
10 answers

SSHing into EC2 server via gives error Please login as the ec2-user user rather than root user

Question as title. Why is this, I have used the ssh command: ssh -i mykey.pem root@xxx-xxx-xx-xx-xxx.compute-1.amazonaws.com But i get that error, find nothing on google. What am I doing wrong?
Tom
  • 6,601
  • 12
  • 40
  • 48
64
votes
4 answers

Amazon EC2 keypair recovery

I need to know of any way to access a running instance in Amazon EC2. I DON'T have the original keypair ".pem" file I DO have access to the aws management console Terminating/rebooting is not feasible the closest to my question I have found was…
Joaquin Brenner
  • 651
  • 1
  • 5
  • 4
64
votes
2 answers

how to reserve a running amazon ec2 instance?

we have a large ec2 instance running in asia pacific region.we want to reserve that particular instance.In aws management console we see an option to purchase a reserved instance but there seems to be no option to change this instance into a…
Soumava
  • 661
  • 1
  • 5
  • 6
63
votes
2 answers

How to install NGINX on AWS EC2 Linux 2

I'm new to AWS and trying to understand which version of NGINX I should be installing on my instance. I've found multiple options; Via EPEL as the blog entry Amazon's own (?) version as this answer The 2016 NGINX official tutorial On my…
mapping dom
  • 1,737
  • 4
  • 27
  • 50
63
votes
8 answers

Amazon EC2 as web server?

I have thought a lot recently about the different hosting types that are available out there. We can get pretty decent latency (average) from an EC2 instance in Europe (we're situated in Sweden) and the cost is pretty good. Obviously, the…
Industrial
  • 41,400
  • 69
  • 194
  • 289
63
votes
2 answers

How to set up an OAuth2 Authentication Provider with AWS API Gateway?

AWS has an API Gateway, that makes it pretty easy to set up, manage and monitor your API. However, the security authorization settings that you can set for resource methods is limited to AWS-IAM (which to my understanding is an internal vpn role?).…
cosbor11
  • 14,709
  • 10
  • 54
  • 69
63
votes
15 answers

EC2 t2.micro instance has no public DNS

I launched an Amazon Web Service (AWS) EC2 Instance, t2.micro, which must be launched into a VPC. The VPC has Auto-assign Public IP set to Yes. DNS resolution: Yes DNS hostnames: Yes But on the EC2 Dashboard, the instance still has a blank Public…
J21042
  • 1,214
  • 4
  • 19
  • 33