Absolute First Step Tutorial for Amazon Web Services

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!

21 comments on “Absolute First Step Tutorial for Amazon Web Services

  1. 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

  2. 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!

  3. Pingback: Amazon Web Services Tutorial - LATEST WEB TRENDS- ONLINE SEARCHES-GOOGLE SEARCH TRENDS – LATEST WEB TRENDS- ONLINE SEARCHES-GOOGLE SEARCH TRENDS

  4. 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

  5. Hi Nils,

    Thanks for the quick response. I try to follow your step in this article and install virgo.

    Thanks.

    Tonté

  6. 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 đŸ˜‰

  7. Pingback: Serving Maps – in the Cloud – for Free (part 1) |  blog.donmeltz.com

  8. Thanks for the nice post. I have been using AWS free tier for a little while and enjoy it. FYI – you can always just run sudo su – in your shell to move to root and not have to type sudo all the time. Now if I can just see real time usage, so if I go over free tier I’ll know?

  9. What would happen if I create an Instance and after I realize that I needed bigger diskspace, and changing the “type” from micro to large?? is this possible?

    I really haven´t signed in into AWS, I want to have some basic theory knowledge first…… maybe i´m being stupid haha… you answer would help, and also your suggestion.

    I believe that if someone says, hey take the plunge, get into AWS and you will learn that way, maybe it will cost you a few bucks, but you will learn. That way I´ll sure do it.

    Actually I will do it today, I will join AWS and start learning something!
    I already got the domain, hmmmm I could try this.

    Thanks in advance for your answer!

  10. Pingback: 158ltd.com – Web Design & Software solutions - Absolute First Step Tutorial for Amazon Web Services

    • This post by Constantin has quite some usefull links to books, articles and blog posts. This might help you getting started with AWS.

      My personal opinion, use the free-tier account and just play around with it. That’s the best way to get some hands-on experience with AWS.

  11. Pingback: Serving Maps – in the Cloud – for Free (part 1) | Don Meltz

Leave a comment