DEV Community

Nitin Kalburgi
Nitin Kalburgi

Posted on

How to Spin an EC2 Instance in AWS?

What is EC2 Instance?

Ever wondered how you can create and maintain your own Virtual Machines in just few clicks? EC2 Instances come for your rescue. In this we are going to learn how to spin an EC2 Instance in AWS.

Requirements

  • AWS account - If you don't have one make sure you get one created before proceeding further.

Step - 1

Image description

As you can see currently there are no instances running.

  • Navigate in Instances tab from dashboard and click on Launch Instance.

Image description

You'll end up on the below page.

Image description

Enter the instance name i.e MyFirstInstance and select the storage and launch type. For this tutorial I would be using t2.mirco and Amazon Linux machine as an launch template. (So I won't incur any costs)

Step - 2

  • We need to create a new key pair.

Image description
Make sure you don't loose you .pem or .ppk file as that would be used to ssh into your instance.(We can also use Instance connect which is way easier)

Step - 3

  • For networking we'll be creating new security group which allows to ssh from anywhere i.e 0.0.0.0/0

Image description

Leaving the rest of the settings as default. Click on the launch Instance.

Image description

_Viola! You have successfully launched an EC2 Instance.

Top comments (0)