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
78
votes
13 answers

User-data scripts is not running on my custom AMI, but working in standard Amazon linux

I searched a lot of topic about "user-data script is not working" in these few days, but until now, I haven't gotten any idea about my case yet, please help me to figure out what happened, thanks a lot! According to AWS User-data explanation: When…
Kai
  • 843
  • 2
  • 8
  • 8
78
votes
12 answers

Enabling/installing GD extension? --without-gd

How does one enable (or perhaps I need to install) GD when my phpinfo() output in "Configure Command" says; --without-gd ? I also have nothing in my phpinfo() output "Core" that lists "gd" PHP Version 5.2.4 on AWS.
Shu
  • 781
  • 1
  • 5
  • 3
78
votes
11 answers

AWS EC2 Connection closed by when trying ssh into instance

Recently I set up a new EC2 instance. The next day I was not able to connect to my instance via ssh. I could connect and disconnect the day before, I am sure I did nothing. Here is ssh debug info: ssh -i webserver.pem -v…
76
votes
12 answers

Installing NPM on AWS EC2

Working on Ec2 on AWS. I have installed Node.js and it works fine. But the problem arises when trying to install npm. I am using the following command to install it: sudo curl http://npmjs.org/install.sh | sh But the install seems to freeze... I…
dade
  • 3,340
  • 4
  • 32
  • 53
75
votes
4 answers

How to run a code in an Amazone's EC2 instance?

I understand nearly nothing to the functioning of EC2. I created an Amazon Web Service (AWS) account. Then I launched an EC2 instance. And now I would like to execute a Python code in this instance, and I don't know how to proceed. Is it necessary…
humalayi
  • 751
  • 1
  • 6
  • 3
75
votes
2 answers

Amazon ELB for EC2 instances in private subnet in VPC

I'm using Amazon EC2, and I want to put an internet-facing ELB (load balancer) to 2 instances on a private subnet. I am using VPC with public and private subnets. If I just add the private subnet to the ELB, it will not get any connections. If I…
Manish Singh
  • 5,848
  • 4
  • 43
  • 31
75
votes
26 answers

What is the default Jenkins password?

I'm using a EC2 server instance. Used the following to install Jenkins: wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ >…
HHC
  • 2,513
  • 2
  • 18
  • 26
74
votes
7 answers

How do I increase the EBS volume size of a running instance?

I have a server running the recent Ubuntu AMIs from Canonical. The size of the EBS boot volume is 8GB. I know that I can resize EBS volumes by taking a snapshot, creating a new volume and expanding the partition on it. How can I increase the size of…
j0nes
  • 8,041
  • 3
  • 37
  • 40
74
votes
6 answers

How do I leave Node.js server on EC2 running forever?

As you can tell by my question, I'm new to this... I built my first website, I set up my first Node.js server to serve it and then pushed everything live on EC2. I tested everything on my EC2 IP address and everything seems to be working. Now up…
Kawd
  • 4,122
  • 10
  • 37
  • 68
73
votes
28 answers

Amazon EC2 instance can't update or use yum

I am using Amazon's tutorial for installing a LAMP server. The first several instructions involve using yum, but every single way I have tried to do it has resulted in the same message. I have found a few other recent questions about the same issue,…
Andrew Johnson
  • 868
  • 1
  • 7
  • 11
72
votes
4 answers

Elastic Beanstalk without Elastic Load Balancer

I would like to switch off Elastic Load Balancer (ELB) for my Elastic Beanstalk environment. Currently I don't need it and I don't want to pay for it. It is possible to delete the ELB in EC2 managment window but then Elastic Beanstalk health state…
72
votes
5 answers

How can I find out why my storage space on Amazon EC2 is full?

When I run df -h on my Amazon EC2 server, this is the output: [ec2-user@ip-XXXX ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 25G 25G 0 100% / tmpfs 4.0G 0 4.0G 0% /dev/shm For…
D_R
  • 4,894
  • 4
  • 45
  • 62
72
votes
10 answers

Can't connect to RDS instance from EC2 instance

From EC2 instance i-78a8df00, I'm trying to connect to RDS instance mysql.************.us-east-1.rds.amazonaws.com. They are both in the U.S. East region. I added the security group of EC2 instance (sg-********) to the RDS security group, but that…
70
votes
14 answers

HDFS error: could only be replicated to 0 nodes, instead of 1

I've created a ubuntu single node hadoop cluster in EC2. Testing a simple file upload to hdfs works from the EC2 machine, but doesn't work from a machine outside of EC2. I can browse the the filesystem through the web interface from the remote…
Steve
  • 4,859
  • 5
  • 21
  • 17
69
votes
9 answers

How do I make cloud-init startup scripts run every time my EC2 instance boots?

I have an EC2 instance running an AMI based on the Amazon Linux AMI. Like all such AMIs, it supports the cloud-init system for running startup scripts based on the User Data passed into every instance. In this particular case, my User Data input…
Adrian Petrescu
  • 16,629
  • 6
  • 56
  • 82