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!
- This tutorial will contribute towards an understanding of cloud computing
- 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.”
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).
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)
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.
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"
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
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
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
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
Here we will be making some changes.
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.
If you would like to give a description of the Security Group, then please feel free to do so at this time.
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.
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.
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.
Locate the Public DNS for your instance. It should look something like this:
ec2-**some set of numbers**.compute-1.amazonaws.com.
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