Light on Dark -:- User Guides

How to set up an AWS instance

Having set up an AWS account, we can now create an instance.

An instance is a cloud server - a single virtual server somewhere in the cloud. It is created by instantiating a ready-built server 'image', a pre-built basic server. Amazon Machine Images are usually referred to as AMIs

There are a number of AMI available on the web, some pre-built as LAMP servers, or with various apps pre-installed, but we will be using a basic Ubuntu image to demonstrate the process. The demo here uses Ubuntu 11.10 (Onieric Ocelot), but you may prefer to use a long-term support version rather than the latest - I would suggest using 10.04 (Lucid Lynx) for now. In future we will be creating AMIs with ResourceSpace pre-installed - watch out for them.


First, let's log in to the AWS management console -  Opens in new window
AWS Management Console

Change the 'default console' to 'Amazon EC2', click the 'save as default' check-box and click on the Sign In button

Sign In Button

Now we are back to a screen you have seen before and will see many times in future - the login screen.

Login Screen

Fill in the details, and sign in.

This is the basic Management Console, as you first see it. You might see a different tab, if you did not select one earlier - just click on the EC2 tab if you did.
EC2 Tab

The default region is US East (Virginia). If you leave this and you do not live in the US, you will find the connection is very slow (the AWS console is slow anyway, but inter region is ridiculous). Change your region if required.

Now find your AMI. There are a lot of AMIs listed under the 'launch instance buttons
Launch OR Launch


but we are using an official Ubuntu image from  Opens in new window - search for the version you want in your region. Use the EBS-backed version rather than the instance store (ask in the forum if you don't know the difference).

This is a search for onei eu eb (Oneiric Ocelot, EU region, EBS based). For a tiny server (free tier), I would use 32 bit (i386) - for medium or large, choose the 64 bit (amd64) AMI.AMI selector

Once you have selected the AMI, just click the link, and the shortcut will start off the 'new instance' wizard for you:
New Instance Wizard 1

Now just work through the wizard...
New Instance Wizard 2

For the free tier, select Micro:

For the availability zone, if this is your first server leave it at 'no preference' - otherwise, you may want to run it in the same zone as your other servers. Not sure about Availability Zones? Ask in the forum.

New Instance Wizard 3

Leave this page as-is - unless you know what you are doing.


New Instance Wizard 4

Tags are useful for identifying servers, and can be referenced in startup scripts, but for now we just want to give our instance a meaningful name.

SSH Key Pairs

Key Pairs

You need to set up one or more key pairs to let you access your new instance through SSH, unless you already have a user set up on the image. Generally you will create one here and download the private key, to use in your SSH or SFTP client.Give the key a meaningful name, and it will be downloaded with the same name.
Key Pair


Security Groups

New Instance Wizard 6

Security Groups define the firewall round your server, they control who can see it and which ports they can see. For now we are setting up a basic one to let HTTP (port 80), SSH (port 22) and WebMin (port 10000) through from anywhere, but you will need to review this with your IT people before putting it 'live'.

Add a Rule

When it looks like this, ‘continue’

Then go back and select both Default and your new group
Select default as well

Default is a group which is created automatically to allow all the servers in the default group to talk to each other - it defines which servers are 'inside' your firewall and which are 'outside'. You only have one server so far, so including it is a matter of starting a good habit rather than being necessary.

Summary Screen

New Instance Wizard 7

When you are happy, click the launch button.
New Instance Wizard 8

Click 'View your instances...' to exit the wizard

Here you can see I have had 3 goes at doing this, and currently have 2 instances running.
Remember your free tier includes 750 hours of micro processing time, that can be three servers running for 250 hours, one server running for almost a year, or as many servers as you want being fired up and shut down again – minimum charge is for one-hour, so 1 minute and 59 minutes both count as one hours use.

To Terminate an Instance

By switching to the unused instance and selecting instance actions we can shut down (terminate) the unwanted server. Note I can identify the unwanted server because I gave the latest one a name in the 'tags' screen. Usual sort order for this screen also puts new instances at the bottom.
Instance Actions


Shutting Down



just making sure we have a vertical scroll bar, otherwise it jitters sideways.