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
89
votes
6 answers

Amazon EC2 ssh timeout due inactivity

I am able to issue commands to my EC2 instances via SSH and these commands logs answers which I'm supposed to keep watching for a long time. The bad thing is that SSH command is closed after some time due to my inactivity and I'm no longer able to…
Roberto
  • 11,557
  • 16
  • 54
  • 68
89
votes
8 answers

How to increase vm.max_map_count?

I'm trying to run Elastic search in an Ubuntu EC2 machine (t2.medium). But I'm getting the message: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] How can I increase the vm.max_map_count value?
Filipe Ferminiano
  • 8,373
  • 25
  • 104
  • 174
89
votes
4 answers

What does ECU units, CPU core and memory mean when I launch a instance

When I launch an instance on EC2, it gives me option for t1.micro, m1.small, m1.large etc. There is a comparision chart of vCPU, ECU, CPU cores, Memory, Instance store. Is this memory RAM of a system ? I am not able to understand what all these…
Prats
  • 1,515
  • 6
  • 16
  • 30
88
votes
3 answers

How to delete instance in EC2?

How can I delete instance in Amazon EC2. I have terminated the instance but still it was showing in instance list table. I want to know few things related to this 1: Is there any significant difference b/w Delete and Terminate? 2: what is the use of…
Pavan Kumar Varma
  • 1,413
  • 1
  • 14
  • 22
85
votes
12 answers

How to push to git on EC2

I am trying to follow this instruction. I have a local git repo and when I do a git push, I need the repo to be pushed to my EC2 instance. But, in the above tutorial, when I do a git push origin master, I get Permission denied (publickey) error…
zengr
  • 38,346
  • 37
  • 130
  • 192
84
votes
21 answers

Can't access site on EC2 instance via public ip

I've been experimenting with EC2 for a couple days and have been banging my head against simply even being able to access the sample site I've hosted. The stack is Rails 3.1.3 with Thin and Nginx. I've tried several different configurations and…
primer
  • 853
  • 1
  • 7
  • 6
83
votes
2 answers

Amazon EC2: how to convert an existing PV AMI to HVM

Question: How should I use the new AWS EC2 classes (r3, i2) with my existing AMI without recreating the whole system setup? The new EC2 classes support only HVM based virtualization but I have only PVM AMI images.
user3760692
  • 839
  • 1
  • 7
  • 4
83
votes
5 answers

SCP Permission denied (publickey). on EC2 only when using -r flag on directories

scp -r /Applications/XAMPP/htdocs/keypairfile.pem uploads ec2-user@publicdns:/var/www/html where uploads is a directory returns Permission denied (publickey). However scp -i /Applications/XAMPP/htdocs/keypairfile.pem footer.php…
user3015797
  • 847
  • 1
  • 6
  • 8
80
votes
20 answers

Connect to mysql on Amazon EC2 from a remote server

I want to connect to db on EC2 from my local machine, I am not able to do and have tried everything- I am using this command to connect to EC2: mysql -uUSERNAME -hEC2_IP -pPASSWORD This error is generated ERROR 2003 (HY000): Can't connect to…
Aashish Katta
  • 1,174
  • 3
  • 13
  • 22
80
votes
5 answers

Amazon ELB in VPC

We're using Amazon EC2, and we want to put an ELB (load balancer) to 2 instances on a private subnet. If we just add the private subnet to the ELB, it will not get any connections, if we attach both subnets to the ELB then it can access the…
Kevin Willock
  • 1,912
  • 1
  • 13
  • 16
79
votes
18 answers

how to fix stream_socket_enable_crypto(): SSL operation failed with code 1

stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Im using Laravel 4.2, PHP 5.6, Apache 2.4 I have GoDaddy SSL installed in…
user4612911
79
votes
5 answers

Rsync to Amazon Ec2 Instance

I have an EC2 instance running and I am able to SSH into it. However, when I try to rsync, it gives me the error Permission denied (publickey). The command I'm using is: rsync -avL --progress -e ssh -i ~/mykeypair.pem ~/Sites/my_site/*…
a53-416
  • 3,585
  • 6
  • 34
  • 44
79
votes
15 answers

PHP-FPM and Nginx: 502 Bad Gateway

Configuration Ubuntu Server 11.10 64 bit Amazon AWS, Ec2, hosted on the cloud t1.micro instance Before I write anything else, I'd like to state that I've checked both nginx 502 bad gateway and Nginx + PHP-FPM 502 Bad Gateway threads, which…
zeboidlund
  • 9,731
  • 31
  • 118
  • 180
78
votes
6 answers

Amazon ec2 user-data, how does it work?

We are starting instances, and accessing the user-data we place. But does anybody understand the internals of this operation (from Amazon's side)? When we pass in the user-data, at what point is that data transmitted to the VM (is this a Xen…
Devrim
  • 2,826
  • 5
  • 25
  • 31
78
votes
16 answers

Amazon EC2 Permission denied (publickey)

This seems to be a common problem but my specific case seems a little different. I set up a new Amazon EC2 instance using the command line tools and connected via SSH and did some configuration work. Initially, though, I couldn't ssh on to the…
Trevor
  • 1,619
  • 1
  • 12
  • 7