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
188
votes
7 answers

EC2 Instance Cloning

Is it possible to clone a EC2 instance data and all?
Josh Scott
  • 3,790
  • 7
  • 29
  • 31
185
votes
3 answers

EC2 instance types's exact network performance?

I cannot find exact network performance details for different EC2 instance types on Amazon. Instead, they are only saying: High Moderate Low What does this even mean? I especially want to know the exact amount of Traffic-OUT on each instance…
シリウス
  • 1,931
  • 3
  • 14
  • 8
183
votes
4 answers

Opening port 80 EC2 Amazon web services

I've opened port 80 in the web console on my E2C instance's security group but I still can't access it via the public dns in the browser. Any ideas?
josh
  • 1,857
  • 2
  • 12
  • 3
179
votes
12 answers

How do I install Python 3 on an AWS EC2 instance?

I'm trying to install python 3.x on an AWS EC2 instance and: sudo yum install python3 doesn't work: No package python3 available. I've googled around and I can't find anyone else who has this problem so I'm asking here. Do I have to manually…
Jake_Howard
  • 2,533
  • 2
  • 15
  • 13
172
votes
2 answers

How Can I Download a File from EC2

What scp arguments should I use to download a file from an Amazon EC2 instance to local storage?
user1226621
  • 1,745
  • 2
  • 11
  • 6
164
votes
4 answers

How to fix apt-get: command not found on AWS EC2?

I installed Ubuntu 12.04 on my Amazon EC2 instance and am trying to install packages using apt-get, but I am getting the following error: sudo: apt-get: command not found Ubuntu comes with apt, so it should be there. How do I fix this?
Pat841
  • 2,663
  • 4
  • 17
  • 15
159
votes
4 answers

What is CPU Credit Balance in EC2?

I came across CPU Credit Balance in EC2 monitoring . What is CPU Credit Balance?
Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67
155
votes
13 answers

.htaccess ErrorDocument 404 not showing up

I have a server from AWS EC2 service running on Linux ubuntu and I have installed apache, php, and mysql. I have added a .htaccess file in my document root /var/www/html. I entered this code in it: ErrorDocument 404 /var/www/html/404.php and it is…
Shalin Shah
  • 8,145
  • 6
  • 31
  • 44
153
votes
7 answers

Error "You must specify a region" when running any aws CLI command

I am trying to use aws container service as per the documentation in http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted.html The below error is thrown when running the command: aws ecs list-container-instances --cluster…
user859375
  • 3,529
  • 5
  • 21
  • 22
147
votes
6 answers

How To Set Up GUI On Amazon EC2 Ubuntu server

I'm using an amazon Ubuntu EC2 instance which is only has a command line interface. I want to setup UI for that server to access using remote desktop tools. Is there any way to apply GUI to the EC2 instance?
Elisha
  • 1,658
  • 3
  • 11
  • 9
142
votes
11 answers

Can you attach Amazon EBS to multiple instances?

We currently use multiple webservers accessing one mysql server and fileserver. Looking at moving to the cloud, can I use this same setup and attach the EBS to multiple machine instances or what's another solution?
bonez05
142
votes
30 answers

Possible reasons for timeout when trying to access EC2 instance

I cannot SSH into my instance - Operation timed out. What could be the reasons why, and what can I do to resolve it? Rebooting normally takes a long time to take effect, and might just makes things worst UPDATE: It is not about permissions - i can…
meow
  • 27,476
  • 33
  • 116
  • 177
142
votes
2 answers

Add EBS to Ubuntu EC2 Instance

I'm having problem connecting EBS volume to my Ubuntu EC2 Instance. Here's what I did: From the Amazon AWS Console, I created a EBS 150GB volume and attached it to an Ubuntu 11.10 EC2 instance. Under the EBS volume properties, "Attachment" shows:…
JackDev
  • 11,003
  • 12
  • 51
  • 68
141
votes
7 answers

How to check whether my user data passing to EC2 instance is working

While creating a new AWS EC2 instance using the EC2 command line API, I passed some user data to the new instance. How can I know whether that user data executed or not?
Pravin
  • 2,871
  • 5
  • 26
  • 29
140
votes
5 answers

Get last modified object from S3 using AWS CLI

I have a use case where I programmatically bring up an EC2 instance, copy an executable file from S3, run it and shut down the instance (done in user-data). I need to get only the last added file from S3. Is there a way to get the last modified file…
wishy
  • 1,748
  • 2
  • 12
  • 14