Questions tagged [amazon-ec2]

Amazon Elastic Compute Cloud (EC2) provides self-service, on-demand, pay-for-what-you-use computing infrastructure resources.

The Amazon Elastic Compute Cloud (EC2) service is part of the Amazon Web Services cloud platform.

EC2 offers computing power in the cloud, on demand. The 'Elastic' part of the name refers to the ability to scale both up and down, as needed.

6563 questions
28
votes
3 answers

Nginx Solution for AWS Amazon ELB Health Checks - return 200 without IF

I have the following code that is working on Nginx to keep the AWS ELB healthcheck happy. map $http_user_agent $ignore { default 0; "ELB-HealthChecker/1.0" 1; } server { location / { if ($ignore) { access_log off; return 200; …
Adam
  • 515
  • 1
  • 6
  • 10
28
votes
4 answers

Run a bash script after EC2 instance boots

I have a script on an EC2 instance that remotely starts another instance. Once this instance has fully loaded (finished booting) I want it to automatically run a bash script, what would be the best way to do this? I need everything to be fully…
SSH This
  • 495
  • 1
  • 5
  • 8
28
votes
5 answers

How to download public key from Amazon AWS?

I have a running amazon ec2 linux instance associated with a keypair (p1) and I have downloaded the private key to my home desktop. Now at work, I created a keypair (p2) on my work desktop and imported the public key to Amazon via the AWS…
Jus12
  • 405
  • 1
  • 4
  • 8
28
votes
2 answers

How to resize Amazon EC2 instance?

Is it possible to resize an Amazon EC2 instance, e.g. convert from a small instance to a large instance? If so, what is the easiest way to resize Amazon EC2 instance? Like Rackspace Cloud Servers do with Rebuild, see screenprint: My instance uses…
Randy Hoff
  • 281
  • 1
  • 3
  • 3
27
votes
2 answers

How to convert a unencrypted EBS to be encrypted

I have a number of older EBS volumes that are not encrypted. In satisfying new corporate security measures, all data needs to be "encrypted at rest" so I need to convert all of the volumes to be encrypted. What is the best way to accomplish this?
Gray
  • 579
  • 1
  • 5
  • 17
27
votes
10 answers

how to forward godaddy domain to ec2 load balancer

I have a domain with godaddy: example.com I have an ec2 load balancer pointing to an ec2 instance. I would like to example.com to point to my load balanced instance. I first added a www cname record for my elb DNS. Then I forwarded example.com to…
petey
  • 572
  • 3
  • 9
  • 20
27
votes
7 answers

Easiest way to automatically check EC2 disk space and be alerted if it is running low?

Running the Amazon Linux AMI. It seems that CloudWatch does not check for free disk space. I have a number of servers and ideally don't want to have to configure each one with a mail server, script to check disk space etc. Is there a simpler way to…
DaBeeeenster
  • 411
  • 1
  • 4
  • 7
27
votes
6 answers

Update Ubuntu 10.04

I keep getting this message when I logged into my server in AWS EC2 via ssh I think this is called MOTD 43 packages can be updated. 22 updates are security updates. but I have already done sudo apt-get update sudo apt-get upgrade sudo apt-get…
Kim Stacks
  • 471
  • 1
  • 6
  • 14
27
votes
4 answers

AWS EC2 and build-essential

I am trying to compile Node.js on Amazon EC2, but I can't even install "build essential". Where's the problem? Thanks. sudo yum install build-essential Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile (...) No…
Randy Hartmen
  • 273
  • 1
  • 3
  • 5
26
votes
3 answers

AWS CLI Command Line: How to use "--query" to output multiple source lines

I am using aws-cli version 1.7.8 to get the --query output to create one record that is derived from multiple lines. In this case I am trying to get specific information from describe-instances. In the describe-instances command, we get lines /…
26
votes
2 answers

How does Amazon ec2-user get its sudo rights

I am looking for where the default Amazon AMI linux image sets up the privileges for the default ec2-user account. After logging in with this account I can use sudo successfully. Checking via the sudoers file, which I open by running visudo (with…
Johan
  • 447
  • 1
  • 5
  • 14
26
votes
8 answers

Why can't I ssh into my new EC2 Instance?

I created a new instance (tiny, 64 bit AMI linux from Amazon) Created a new key pair called "mir". I downloaded mir.pem and put it in my ~/.ssh folder. I even did ssh-add mir.pem. Then I tried to ssh ubuntu@public_DNS_from_amazon Why doesn't it…
Alex
  • 8,471
  • 26
  • 75
  • 99
26
votes
3 answers

How can I deploy a scalable, reliable haproxy cluster on Amazon EC2?

We need some more advanced functionality than ELB provides (mostly L7 inspection), but it's not obvious how to handle things like heartbeat and high availability with something like haproxy using EC2. There's a high likelihood we'd need 3 or more…
25
votes
1 answer

In AWS, how to check which resources are using VPC IP addresses

According to Amazon and my test, a /24 VPC subnet allows for 251 available IP addresses. I have 2 other subnets in that VPC that appear to have no IP's in use by EC2 and the available IPs field indicates that there are only 250 available. I have…
ilanco
  • 353
  • 1
  • 3
  • 5
25
votes
6 answers

Windows Password won't decrypt on AWS EC2 even with the correct private key

I created a new Windows instance on AWS EC2, using a keypair I created by uploading my public key from my local machine. The instance launched fine, but it won't decrypt the password. It reports: I'm certain I uploaded the correct key. I've…
Craig Ringer
  • 11,083
  • 9
  • 40
  • 61