Skip to content

Creating an Amazon EC2 Instance

August 21, 2012

Purpose

To give a step by step account of how to stand up a new EC2 Server on Amazons Management Console and configuring it for SSH

What is an Amazon EC2 Server?

Amazon EC2 stands for Amazon Elastic Compute Cloud. It’s allows users to rent virtual computers (accessible through ssh, http, https if configured for it)  on which to run their own computer applications.

Steps

  1. Login to your AWS Management Console
  2. Under Amazon Web Services, click on EC2 Virtual Servers in the Cloud
    • Note: this is where you can manage all of your current EC2 instances (i.e. creating, deleting, modifying)
  3. To create a new EC2 server, click “Launch Instance” on the top bar
  4. Select classic wizard and click continue
    • AWS Marketplace is where you would go to find already built up images of virtual servers. This means that people have created EC2 instances have have installed various pieces of software on these servers (such as java, apache tomcat, python, etc.) and then took a snapshot of these EC2 instances and posted them in this market place.
  5. CHOOSE AN AMI – Select the type of operating system you want the EC2 server to be running.
    • You can select different Linux operating systems such as Ubuntu or Red Hat. You can also select Windows operating systems.
    • You can also select if it should be a 32 bit or 64 bit operating system.
  6. INSTANCE DETAILS 1 – Here’s where you can select how many instances of that OS you want to set up, the size or instance type of the instance and where teh instance is available.
  7. INSTANCE DETAILS 2 –
    • Kernel ID
    • RAM Disk ID
    • Shutdown Behavior – describes how the instance should be shutdown. There are 2 choices: Stop – simply stops the instance so that you can start it up again, Terminate – stops and deletes the instance upon shutdown.
  8. INSTANCE DETAILS 3 – This allows you to review the instance details you have selected and edit them if you’d like
  9. INSTANCE DETAILS 4 – This is where you can add key and value pairs. The Name key’s value is the displayed name of the instance on the EC2 Management Console.
  10. CREATE KEY PAIR – This is where you would select whether to use an existing key pair or create a new key pair to perform the inital SSH into the server.
    • When “Creating a new Key Pair” follow the instructions to enter the name of the key pair and download the key pair.
  11. CONFIGURE FIREWALL – This is where you configure which ports are open for accessing the virtual server
    • Some ports you may want to open:
      • 22 – SSH
      • 80 – HTTP
      • 443 – HTTPS
      • 8080 – Apache Tomcat
  12. REVIEW – Gives an overview of all the settings you set for the instance. You can select ot go
  13. Find the Public DNS of the newly created instance. This is the host you will use to connect via ssh.
    • On the AWS console select on the instance you just created and scroll won on the description of the instance until you find the Public DNS.
  14. Install PuTTY.
  15. Connecting through SSH
    • Open a command prompt
    • Change directory to the location of the PEM file you downloaded when you created a key pair
    • Exectue:
      chmod -R 700 your_file_name.pem
    • Exectue:
      ssh -i your_file_name.pem root@public.dns.compute-1.amazonaws.com
  16. Configure SSH on the Amazon EC2 Server

Useful Links

http://aws.amazon.com/ec2/

http://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud

http://briglamoreaux.wordpress.com/2012/03/14/import-that-image/

http://coenraets.org/blog/2011/11/set-up-an-amazon-ec2-instance-with-tomcat-and-mysql-5-minutes-tutorial/

Advertisements

From → Guide

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: