DEV Community

Ashwin Raiyani
Ashwin Raiyani

Posted on

Launch Amazon EC2 Linux Instance Step 1: Launch a Linux Virtual Machine

Step 1: Launch a Linux Virtual Machine

Launch an Amazon EC2 instance

Our first requirement is that our product team would like a Linux web server that has Apache installed on it. They would also like for it to be publicly accessible, so let’s get going.

1.In the AWS Management Console, find and select the Amazon EC2 dashboard

2.From the Amazon EC2 dashboard, click "Launch Instance"

3.Notice the variety of AMIs located on the AMI page. These are different templates for different types of machines. Select the Amazon Linux 2 AMI (HVM)

4.Notice the variety of instance types available. Select the t2.micro instance.

5.Select Next: Configure Instance Details

We are going to use our default Amazon VPC and launch our Amazon EC2 instance into the default public subnet where it will automatically assign our virtual machine a public IP address.

6.Accept the default settings for the Step 3: Configure Instance Details page

7.Click Next: Add Storage

a.We will not need another Amazon Elastic Block Store (Amazon EBS) volume

8.Click Next: Add Tags

9.Click Add tag then configure:

Key: Name Value: WebServer
10.Click Next: Configure Security Group

11.Configure a new security group as follows:

a.Security group name: WebserverSG

b.Description: Security group for my webserver

A security group works very much the same way as a firewall. It contains a set of rules that filter traffic coming into and out of an Amazon EC2 instance. By default, all non-local traffic is blocked. For example, webservers typically allow public traffic access on port 80 (HTTP) and/or port 443 (HTTPS) and also keep SSH rules. In all 3 rule, keep the IP source as "Anywhere"

c.Click Review and Launch.

12.Review the details, scroll down and click Launch.

13.In the Select an existing key pair or create a new key pair dialog box, choose Create a new key pair, enter a name for the key pair, and then choose Download Key Pair. This is the only chance for you to save the private key file, so be sure to download it. Save the private key file in a safe place.

14.On the Launch Status page, scroll to the bottom and click View Instances. You’ll be taken to the Instances page.

Top comments (0)