Setting Up an Amazon EC2 Instance

Posted by on Jun 5, 2012 in AWS, Hosting, Server Admin | No Comments
Setting Up an Amazon EC2 Instance

This is Part 2 of a 3 part series on installing a WordPress instance on AWS

Part 1: Hosting Websites in the Amazon Cloud

Part 2: Setting Up An EC2 Instance

Part 3: Installing WordPress on EC2

How to set up an EC2 Instance

Setting up an Amazon EC2 instance is extremely easy as I will show you in this tutorial.

What You Need:

You will need the following to get started:
1) A verified AWS account

Step 1: Set up your account with Amazon Web Services

Go to aws.amazon.com and set up an Amazon Web Services account. You will need a credit card and a telephone for pin verification. Note you might be eligible for a free micro instance for one year. You can use this for what we are setting up here, but note that you will still need a credit card to set up the account. This will take a few minutes to get your account online after you sign up. Get some coffee now if you like.

Step 2: Set up your instance


Once you receive an email telling you your account is ready, we can now go in and create a server instance. Head back to http://aws.amazon.com and from the main menu, select “AWS Management Console

If you want to set up the free usage tier – just within the limitations of the terms of service (basically 1 micro instance) and you’ll be good – you won’t be billed for your first year. See the full details.

So to launch an instance – select EC2 from the AWS Management Console. You’ll get the EC2 console.

Click the “Launch Instance” button.
Select the “Classic Wizzard”

Choose an AMI

Now we will select our instance. For this tutorial we’ll use Ubuntu so select either the Ubuntu Server 12.04 LTS or the Ubuntu Server 11.10 (I went with the 12.04 LTS but both are fine for serving a website). I also went with 64bit.

Instance Details

From the next screen – we’ll just request 1 instance. Make sure the instance type is Micro and select “Continue”.

I just use the defaults for the kernel and RAM Disk ID settings.

Key Pairs

You will be prompted to create a Key Pair. I left the Key to the default of “Name” and for the Value I filled in “Website” – this can be whatever you like. Basically this names your instance so you can tell them apart if you have more than one. This can be edited later as well, but put something in there for now.

Next, enter a name for your key pair – this is important, but label it something readable like mywebsitekey or something you can recognize.

When you create the key pair, a file will download to your desktop. Keep this. You will need it to log in to the server.

For the security group settings, you can leave them with the quick-start-1 defaults.

At this point you’ll get a confirmation screen. You can go ahead and proceed with the instance set up. This can take a few minutes. Use the “refresh” button back on the console to check the set up status.

After you “refresh” you should see “1 Running Instance” on the “My Resources tab. This brings up the Instances list.

Select your instance and you will get the “details” panel below.

Basically from here you can see the information around our server instance. The important thing here is the Public DNS. Its the long url – in my case its ec2-174-129-125-62.compute-1.amazonaws.com for the sake of this tutorial, but yours will be different. Also make note of the public IP address. Its not set up to work yet, but I will show you how to do this in the next tutorial.

So in this example, we have successfully set up a server instance. The great thing about Amazon is these instances can be initiated or terminated and you’ll only pay for what you use. I made some mistakes when I first tried setting mine up – I decided later to switch from Apache to Ubuntu. Not knowing what I was doing – I had created 4 instances. You get charged by the hour so I terminated them. Total charge – 8 cents.

So welcome to your first cloud server! In the next post I will show you how to set it up and get WordPress running.

This is Part 2 of a 3 part series on installing a WordPress instance on AWS

Part 1: Hosting Websites in the Amazon Cloud

Part 2: Setting Up An EC2 Instance

Part 3: Installing WordPress on EC2