Create new instance of EC2 instance on AWS

Listed below are the steps for creating and connecting to new EC2 instance on AWS. For this example we are going for a new Ubuntu micro instance which is part of the AWS free tier list.

Step 1: Sign in to your AWS account page.

201307131903.jpg

Step 2: Click My Account/Console drop down available on the top right hand side and select AWS Management Console from the list.

201307131906.jpg

Step 3: In the Services page, navigate to Compute & Networking section and click EC2 instance. This should open the EC2 dashboard page as shown below.

201307131908.jpg

Step 4: Clicking on the Launch Instance button would display the following Create a New Instance screen.

201307131910.jpg

Step 5: Provide a name for your instance, key pair and choose Ubuntu Server 12.04.2 LTS under Launch Configuration. After downloading key pair to your local system, click the Continue button. Then click the launch button to launch your instance.

201307131914.jpg

201307131916.jpg

Connecting to EC2 instance

Step 1: Navigate to your AWS EC2 Dashboard and choose the appropriate running instance. In this example we are going with the Ubuntu t1.micro instance.

201307131919.jpg

Step 2: Now click the Actions drop down and select Connect from the drop down list.

201307131924.jpg

Step 3: In the Connect to an instance screen, click the Connect with a standalone SSH client.

201307131926.jpg

This should provide you with details for connecting to EC2 instance with a standalone SSH client.

Step 4: Open a new terminal window (on Mac and Cygwin on Windows) and type in the command line statement.

ssh -i raviaws.pem ubuntu@54.213.42.32

make sure to replace AWS key pair and instance with your details. ssh -i <key pair><instance details>

201307131935.jpg

You might see the above “Permission denied (publickey” error if you have not navigated to folder where you had downloaded the AWS key pair for the EC2 instance.

201307131942.jpg

Step 5: Also make sure to give appropriate file permission for key pair file to avoid the permission error using chmod function.

201307131949.jpg

Then try again the command line statement again to connect to the EC2 instance. Now you are ready to use the newly created EC2 instance.

In case you are doing a trial of AWS EC2 instance then make sure stop or terminate the instance after your trial usage to avoid incurring any cost for the usage.

201307131954.jpg

In Category: General

Ravi Shankar

A Software developer and blogger who is always looking to provide technical help to the wider community.

Show 0 Comments
No comments yet. Be the first.

Leave a Comment

Get your free copies of the following tech guides by joining the Digital Answers mailing list.