DEV Community

Cover image for Launching Amazon EC2 Instances
Samuel I. G.
Samuel I. G.

Posted on • Edited on

Launching Amazon EC2 Instances

Amazon Web Services (AWS)is one of the largest cloud service providers in the world. AWS offers scalable computing power through the Amazon Elastic Compute Cloud (Amazon EC2). In “AWS EC2 Basics — I” I explained the basics of AWS EC2 Service. In this article, I will explain how to launch an EC2 instance using AWS Console.

In the AWS Cloud, a virtual server is known as an instance. From an Amazon Machine Image, you launch an instance (AMI). The operating system, application server, and apps for your instance are provided by the AMI.

AWS EC2 Instances

Before you start launching an EC2 instance, there are some prerequisites that you’ve to complete. First, you have to sign up for AWS account. Your AWS account is automatically set up for all AWS services, including Amazon EC2, when you sign up for Amazon Web Services.

You just pay for what you use when using Amazon EC2 and if you are a new AWS subscriber Amazon EC2 can be launched for free. The AWS Free Tier provides customers the ability to explore and try out AWS services free of charge up to specified limits for each service.

To protect the login details for your instance, AWS employs public-key cryptography. When launching your instance, give the name of the key pair, and when using SSH to log in, give the private key.

If you haven’t previously done so, you can create a key pair through the Amazon EC2 dashboard. See the documentation. You can also create a new key pair when launching an EC2 instance.

Sign in and Go to EC2 Service

When you signed in it navigates to the console home page. Console Home displays widgets with important information about your AWS environment. On top menu, you can either search the EC2 service from the search bar or select it from the services menu and navigate to EC2 console dashboard.

Sign-in to AWS

launch an instance

From the EC2 console dashboard, in the Launch instance box, choose Launch instance, and then choose Launch instance from the options that appear.

Launching EC2

Under Name and tags, for Name, enter a descriptive name for your instance. You can also add a tag but it is optional.

EC2 instance name

Under Application and OS Images (Amazon Machine Image), do the following:

Choose Quick Start, and then choose Amazon Linux. This is the operating system (OS) for your instance.
From Amazon Machine Image (AMI), select an HVM version of Amazon Linux 2. Notice that these AMIs are marked Free tier eligible. An Amazon Machine Image (AMI) is a basic configuration that serves as a template for your instance.

EC2 AMI

You can choose the hardware setup for your instance under Instance type from the Instance type list. Select the t2.micro instance type, which is the default option. The free tier is available for the t2.micro instance type. You can also utilize a t3.micro instance on the free tier in regions where t2.micro is not accessible.

EC2 Instance Types

Under Key pair (login), for Key pair name, choose the key pair that you created when getting set up. If you want to use a new key pair you can also create a new one by clicking the “Create new key pair” button on the right side.

EC2 Keypair

After selecting the key pair, now we will choose or create a security grup. Pick Edit next to Network options. You’ll notice that security groups are under the Security group name. You can do the followings:

Choose an existing security group.
Select your security group from the list of available security groups under Common security groups.
You can see that a General Purpose SSD (GP2) root volume of 8GB has been automatically provisioned for the instance in the Configure Storage step. Changes to volume types, size, and additional volumes are all possible. But for this launch keep the default selections.

EC2 Storage Types

Now every step is completed and when you’re ready, select “Launch instance” after reviewing a summary of your instance configuration in the Summary panel.

EC2 Launching Summary

A confirmation page lets you know that your instance is launching. Choose View all instances to close the confirmation page and return to the console.

View EC2 Instances

On the Instances screen, you can view the status of the launch. It takes a short time for an instance to launch. When you launch an instance, its initial state is pending. After the instance starts, its state changes to running and it receives a public DNS name.

EC2 Instances Dashboard

In this article, we created an on-demand EC2 instance. It’s an on-demand server, so you can “Stop” it when it’s not needed to reduce costs. Based on your preferred OS platform, you can provision any of Linux or Windows EC2 instance or any of the available AMIs in the AWS Marketplace.

In next article, we will create an auto scaling group and learn to create ec2 with “launch template” option.

This article was originally published at https://www.linkedin.com/pulse/aws-ec2-basics-ii-launching-instance-samuel-i-g-/

Top comments (0)