Friday, December 31, 2010

Creating a (free) Linux EC2 Instance

This is my first attempt at creating a Linux instance on EC2. No Earth shattering revelations but I figured I'd document the process - hope it helps.


1. Sign up for AWS Free Usage Tier. It’s free for a year. If you already have an AWS account you’ll need to create a new one to take advantage of the freebie. I'm not condoning it but if you need another email address to register and you were so inclined you could use the Gmail plus trick.

2. Login to the AWS Management Console and click "Launch Instance".
3. Select "Basic 64-bit Amazon Linux AMI 1.0." At the time of this writing the AMI Id: ami-2272864b.
4. On the next screen be sure to change change the Instance Type from "Large (m1.large, 7.5 GB)" to "Micro (t1.micro, 613 MB)". The Free Usage Tier only covers a single micro instance and Amazon defaults to large. Click "Continue".
5. Default values on the next screen. Click "Continue"
6. Default values on the next screen. Click "Continue"
7. On the next screen enter a name for your key pair, i chose "rtremainekey". Click "Create & Download your Key Pair". Save it somewhere safe.
8. Select the "quick-start-1" Security Group. Click "Continue".
9. The next screen should look something like this. Click "Launch".
10. Your instance is now launching. Click "Close".
11. Select "Elastic IPs" from the navigation menu on the left. Click "Allocate New Address". Click "Yes, Allocate".
12. Select the id of the instance that we just created. Your id will be different. Click "Associate".
13. Select "Instances" from the left navigation and you should see something similar to this. Note: Instance ids are unique so yours will different than i-efd43683.
14. You should now be able to SSH into your instance as "ec2-user". Use the -i flag to point to the key you downloaded in step 7. Use the IP address that you created in step 12. (Mike Comstock's step 2 has some info on using Putty rather than SSH).
$ sudo chmod 600 ~/rtremainekey.pem
$ ssh ec2-user@50.16.195.2 -i ~/rtremainekey.pem
You should see
There you have it.

No comments:

Post a Comment