I am currently playing around with Amazon Web Services (AWS) to get some hands on experience in the cloud. Today I would like to share some of the gained knowledge about the first steps with AWS. This tutorial will mainly cover setting up an EC2 instance backed up by an EBS storage and how to work with that instance.
Time to sign up
Amazon is giving away some free stuff to new customers. Among those is a Amazon EC2 Linux Micro Instance that can be opearte 24/7 for a whole year, as well as 10 GB of Amazon Elastic Block Storage and some I/O opeartions on it. Basicly, they are giving away all you need to get a 100% free look into parts of AWS. So if you don’t have an account yet, sign up here.
Create a new instance
Now it is time to launch a new instance. Open the AWS Console and select the EC2 tab. Select your desired region to launch the instance within (blue circle) and afterwards click on launch instance (red circle).
Next, select the Basic 32-bit Amazon Linux AMI and continue.
In the following screen switch the instance type from a Small Instance to a Micro Instance. Leave the other options with their defaults and continue.
Neither do we want to change any advanced settings nor add any tags to the instance. Thus, skip the next two dialogs (click continue twice), till you reach the key-pair dialog. As we haven’t created any key pair yet, we will do so now. Select Create a new Key Pair (bule circle), type in any appropriate name for the key pair (red circle) and click on Create & Download your Key Pair (green circle). This will generate a new key pair and you will be asked to store it on your machine. Do so!
The next thing you need to do is set up a security group for the instance. As we don’t wont to go with the default one for now, you need to create a new group. Select Create a new Security Group (blue circle), give it an appropriate name and description (red circle). You need to define some allowed connections. Select HTTP from the drop-down (green circle) and click on Add Rule (yellow circle). Repeat the last step for HTTPS and SSH, so you end up with all three rules added to your security group. Click on continue to create the group.
On the final screen you are able to review all your inputs regarding the instance. A click on Launch will start the instance, which in fact will take a couple of minutes (sometimes only seconds). If you refresh the My Resources panel in AWS console your newly created instance as well as the created EBS storage, key pair and security group will show up eventually.
If you click on 1 Running Instance it will take you to the My Instances screen, where you can select your new instance and see all its details. Among these details is the Public DNS, note it down for later use!
Connecting to the instance
Once your instance is running, you might connect to it via SSH. If you are using Unix/Linux, I probably don’t need to tell you how you do that, just take the the public DNS and ssh to it. On Windows systems you might want to use Putty to get an SSH connection to your instance. On Keyword Intellect is a great blog post how to do that, so I wont repeat it here. One thing to add, make sure to log on as ec2-user not root.
Installing Apache HTTP Server on the instance
As an example we are going to install the Apache HTTP Server on the instance. Type the following line to install Apache and reply with y to all questions popping up.
sudo yum install httpd
After the installation is completed type the following statement to start Apache.
sudo /etc/init.d/httpd start
Go with your web browser to http://$YOUR-PUBLIC-DNS. You should see a page similar to the following. So now you know how to get started with Amazon Web Services, it is time for you work with your instance now. Enjoy!
<p








Thanks for this article.
I am starting a business in which I will be deploying dozens of WordPress sites. Is there to do this with a one-click functionality of cPanel on Amazon in an Apache environment?
-Josh
Hi Josh,
I am not sure what exactly you question is aiming at and I have not worked with cPanel, so I cant tell you how it may work in combination with AWS. Sorry mate!
Great tutorial! I got Apache running in minutes with your help. Do you have any idea how to get Tomcat installed?
If you want to install Tomcat, just do it, as you installed the httpd (a bit of linux/server administration skills a required). A (better) alternative might be to use one of the existing AMIs e.g. http://aws.amazon.com/amis/1993?_encoding=UTF8&jiveRedirect=1
If you really wanna do it by hand, check out this tutorial by Moti Karmona:
http://blog.karmona.com/index.php/2010/09/15/servlet-on-ec2-using-aws-toolkit-for-eclipse/
Hi Nils,
Is it possible to install Spring DM Server on Amazon EC2? If so how do I do it?
Thank you.
Tonté
Hi Tonté,
as your Amazon Instance behaves just like a usual server (from the OS/administration perspective) you might install Spring DM Server just as you would on any other machine (see http://static.springsource.com/projects/dm-server/1.0.x/user-guide/html/ch01s02.html#installation-zip-installing). By the way, are you aware, that SpringSource dm Server is Now the Eclipse Virgo Project.
I managed to install it using yum. Took me a while to remember all the Linux commands. Here are all the commands I needed (in case somebody else is wondering):
$ sudo yum install tomcat6
$ sudo yum install tomcat6-webapps
$ sudo yum install tomcat6-admin-webapps
$ sudo vi /etc/tomcat6/tomcat-users.xml (to add manager user)
$ sudo /etc/init.d/tomcat6 start
Thanks!
Pingback: Amazon Web Services Tutorial - LATEST WEB TRENDS- ONLINE SEARCHES-GOOGLE SEARCH TRENDS – LATEST WEB TRENDS- ONLINE SEARCHES-GOOGLE SEARCH TRENDS
I’m sorry I followed all the steps but didn’t work for me. I’m kind of dissapointed maybe I’m too stupid to use AWS, for the first impression I seem it’s a very complex thing to manage
I did every step without any mistakes but when I put http://$PUBLIC-DNS it just stays loading and after that says It can load the page
Could you help me? I’d really appreciate it
Hey Roman, sorry to hear, that the tutorial didn’t work out for you. Just to get that right, you did replace the http://$YOUR-PUBLIC-DNS with your actual public dns which looks something like this: http://ec2-174-129-227-190.compute-1.amazonaws.com ?
Hi Nils,
Thanks for the quick response. I try to follow your step in this article and install virgo.
Thanks.
Tonté
Very good introductory post Nils. I’m going to have an AWS training tomorrow and just wanted a bit of an overview… I found it here. Good blog… I have the exact same theme on mine. Cheers
Pingback: Serving Maps – in the Cloud – for Free (part 1) | blog.donmeltz.com