Skip to content
Go to file
Cannot retrieve contributors at this time
executable file 153 lines (87 sloc) 6.64 KB
layout title comments date
How to set up an Amazon EC2 Instance
2015-06-22 01:55:36 -0700

#How to set up an Amazing Amazon EC2 Instance Authored by Jackson Sorenson for EDAMAME2015, based on a previous tutorial by Kevin Hall and Tracy Teal for EDAMAME2014 EDAMAME-2015 wiki

EDAMAME tutorials have a CC-BY license. Share, adapt, and attribute please!

##Overarching Goal

  • This tutorial will contribute towards an understanding of cloud computing

##Learning Objectives

  • Select a community AMI image to initiate an Amazon EC2 instance
  • Make and use a "key" for secure EC2 connection

Go to Amazon Web Services in a web browser.

Select ‘My Account/Console’ menu option ‘AWS Management Console.”

AWS Login Image

Log in with your username & password. If you are new to Amazon then select 'I am a new user.' and create an account (NOTE: You do need a credit card, but there is a free tier of usage).

Click on EC2 (towards the upper left of the page).

EC2 Instance

Step 0:

In the top right of the page between your login name and 'Help' there's a drop down menu with regions. Select 'US East (N. Virginia)'.


Click on the blue “Launch Instance” button (midway down the page)

Step 1:

First we need to select an AMI. An AMI is essentially a picture of a particular computer set up. In the beginning of this course we will be using an AMI maintained by the QIIME developers. Searching for "qiime" under the community AMIs will show the QIIME developers' AMI.

Community AMIs

Later in the course we will use a separate AMI for the purposes of our mgDNA analyses. You can find this AMI by searching "EDAMAME"


Step 2:

Select the appropriate instance type. This depends on the size of the data you are working with.

For the purpose of this workshop we will choose m3.large

Select Next: Configure Instance Details

Step 3:

At this step you can change specfic components of the instance.

For the purposes of this workshop we will not need to change any details.

Select Next: Add Storage

Step 4:

Set 100 Gb for this instance. If you have a particularly large data set, then you may want to request more data storage space.

For the purposes of this workshop, 100 Gb should be plenty of space for our data files.

Select Next: Tag Instance

Step 5:

As you become more adept at utilizing EC2 Instances, you may wish to create tags for them.

For the purposes of this workshop we will not need to create a tag of the instance.

Select Next: Configure Security Group

Step 6:

Here we will be making some changes.

  1. Keep the default Security Group Name. Two independent users of the same AMI cannot have the same security group name, hence why we keep the default.

  2. If you would like to give a description of the Security Group, then please feel free to do so at this time.

  3. Next we will be adding some rules to the security group.

  • Keep the existing ssh rule.

  • Click on Add Rule and select HTTP.

  • Click on Add Rule and select HTTPS.

  • Click on Add Rule and select Custom TCP Rule. Change the Port Range to 8787. Select Anywhere from the Source drop down menu.

  • Click on Add Rule and select Custom TCP Rule. Change the Port Range to 8888 . Select Anywhere from the Source drop down menu.

The Security Group Configuration should look like the image below once you add the above rules.

Configure Security Group

Click on the blue Review and Launch button!

If you would like to, take the time to double check that everything is setup the way you intended.

Once you are sure that the EC2 Instance is set up the way you would like it to be set up, then click on the blue Launch button.

Key Pair Pop-up

If you already have a key pair and you wish to use it, then select Choose an existing key pair, pick your desired key, select the acknowledgement (making sure you have access to .pem file) and then click on the blue Launch Instances button.

If you do not have an existing key pair or you do not want to use one you already have, then select Create a new key pair. Give the key pair a name; the below example's key pair's name is "EDAMAME".

  • Click on Download Key Pair and save it to a known location.

  • Click on the blue Launch Instances button.

At this point Amazon will give a warning saying that the EC2 instance you are starting is "open to the world". This means that anyone is capable of accessing the instance so long as they have the public DNS and the specific key file. We are not concerned about this warning, mostly because each of us will have our own keyfile that no one else will. This means even if I had your public DNS for your EC2 instance I couldn't login to it without you keyfile as well. If you want to have extra protection in the future, you can adjust the IP address ranges in the rules under the security group part of the EC2 setup to match your specific IP address. Keep in mind laptops will change IP addresses depending upon which network they are connected.
Key Pair Pop-up

EC2 Dashboard - Instances

At this point you will be brought to your list of Instances on the EC2 Dashboard. The instance you just launched will have a yellow pending circle next to it. When the yellow cirle changes to a green circle, your instance is up and running. In the example below, there are two instances currently running. Select your instance by clicking on the box to the left and you will see its details appear in the pane below your list of instances.

EC2 Dashboard Instance List

Locate the Public DNS for your instance. It should look something like this:

ec2-**some set of numbers**

At some point you will need to highlight and copy the Public DNS. This is the link to your specific instance that you started at Amazon Web Services (AWS).

##Help and other resources

You can’t perform that action at this time.