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

What data is stored in Ephemeral Storage of Amazon EC2 instance?

I am trying to stop a Amazon EC2 instance and get the warning message Warning: Please note that any data on the ephemeral storage of your instance will be lost when it is stopped. My Question What data is stored in ephemeral storage of an Amazon…
Gaurav Agarwal
  • 18,754
  • 29
  • 105
  • 166
287
votes
4 answers

Do you get charged for a 'stopped' instance on EC2?

Bit confused here, I have an on-demand instance but do I get charged even when I stop the instance?
Mantorok
  • 5,168
  • 2
  • 24
  • 32
278
votes
11 answers

Add Keypair to existing EC2 instance

I was given AWS Console access to an account with 2 instances running that I cannot shut down (in production). I would, however, like to gain SSH access to these instances, is it possible to create a new Keypair and apply it to the instances so I…
Chris Wagner
  • 20,773
  • 8
  • 74
  • 95
277
votes
18 answers

Using scp to copy a file to Amazon EC2 instance?

I am trying to use my Mac Terminal to scp a file from Downloads (phpMyAdmin I downloaded online) to my Amazon EC2 instance. The command I used was: scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz …
HoKy22
  • 4,057
  • 8
  • 33
  • 54
263
votes
12 answers

Setting up FTP on Amazon Cloud Server

I am trying to set up FTP on Amazon Cloud Server, but without luck. I search over net and there is no concrete steps how to do it. I found those commands to run: $ yum install vsftpd $ ec2-authorize default -p 20-21 $ ec2-authorize default -p…
SharkTheDark
  • 3,089
  • 4
  • 24
  • 29
251
votes
14 answers

WARNING: UNPROTECTED PRIVATE KEY FILE! when trying to SSH into Amazon EC2 Instance

I'm working to set up Panda on an Amazon EC2 instance. I set up my account and tools last night and had no problem using SSH to interact with my own personal instance, but right now I'm not being allowed permission into Panda's EC2 instance. Getting…
btw
  • 7,006
  • 9
  • 40
  • 40
235
votes
10 answers

What is the difference between Amazon ECS and Amazon EC2?

I'm just getting started on AWS EC2. I understand that EC2 is like a remote computer where I can do pretty much everything I want. Then I found out about ECS. I know it uses Docker, but I'm confused about the relationship between these two. Is ECS…
paynestrike
  • 4,348
  • 14
  • 46
  • 70
220
votes
11 answers

How to use multiple AWS accounts from the command line?

I've got two different apps that I am hosting (well the second one is about to go up) on Amazon EC2. How can I work with both accounts at the command line (Mac OS X) but keep the EC2 keys & certificates separate? Do I need to change my environment…
Matt Culbreth
  • 2,835
  • 2
  • 19
  • 17
215
votes
19 answers

How to see all running Amazon EC2 instances across all regions?

I switch instances between different regions frequently and sometimes I forget to turn off my running instance from a different region. I couldn't find any way to see all the running instances on Amazon console. Is there any way to display all the…
GorvGoyl
  • 42,508
  • 29
  • 229
  • 225
202
votes
5 answers

Do on-demand Mac OS X cloud services exist, comparable to Amazon's EC2 on-demand instances?

Amazon's EC2 service offers a variety of Linux and Windows OS choices, but I haven't found a service offering a similar "rent by the hour" service for a remote Mac OS X virtual machine. Does such a service exist? (iCloud looks to be just a data…
Iterator
  • 20,250
  • 12
  • 75
  • 111
200
votes
9 answers

mongodb, replicates and error: { "$err" : "not master and slaveOk=false", "code" : 13435 }

I tried mongo replica sets for the first time. I am using ubuntu on ec2 and I booted up three instances. I used the private IP address of each of the instances. I picked on as the primary and below is the code. mongo --host Private IP…
user959129
200
votes
28 answers

Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk

I'm running into "413 Request Entity Too Large" errors when posting files larger than 10MB to our API running on AWS Elastic Beanstalk. I've done quite a bit of research and believe that I need to up the client_max_body_size for Nginx, however I…
198
votes
2 answers

What is "EC2-Other" filter in "Cost Explorer" dashboard mean?

While investigating AWS Bill using Cost Explorer tool, I selected EC2-Other filter under services and it showed an amount around 5k monthly but I still don’t know what capabilities (features or services) are costing all this amount. What does…
Ammar Badran
  • 2,089
  • 2
  • 6
  • 5
198
votes
12 answers

Extension exists but uuid_generate_v4 fails

At amazon ec2 RDS Postgresql: => SHOW rds.extensions; rds.extensions …
Incerteza
  • 32,326
  • 47
  • 154
  • 261
189
votes
29 answers

Find region from within an EC2 instance

Is there a way to look up the region of an instance from within the instance? I'm looking for something similar to the method of finding the instance id.
Gary Richardson
  • 16,081
  • 10
  • 53
  • 48