AWS EC2 Basics - II | Launching EC2 Instance

AWS EC2 Basics - II | Launching EC2 Instance

Amazon Web Services (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.

Launching AWS EC2 Instance

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.

No alt text provided for this image

To 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.

No alt text provided for this image

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

No alt text provided for this image

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

  1. Choose Quick Start, and then choose Amazon Linux. This is the operating system (OS) for your instance.
  2. 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.

No alt text provided for this image

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.

No alt text provided for this image

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.

No alt text provided for this image

Pick Edit next to Network options. You'll notice that the wizard generated and chosed a security group for you under Security group name. You can do the followings:

  1. Choose an existing security group.
  2. 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 addition of additional volumes are all possible. But for this launch keep the default selections.

No alt text provided for this image

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.

No alt text provided for this image

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.

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.


No alt text provided for this image
No alt text provided for this image

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 creating ec2 with "launch template" option.

Ferhat C.

AWS | K8s | Docker | SQL | Python | Linux | Git |

2y

Thanks 👍

To view or add a comment, sign in

More articles by Ismail Gokdeniz

  • Different Types of Cloud Computing Models

    Different Types of Cloud Computing Models

    Originally published at nioyatech.com In today’s digital age, companies are always looking for new ways to manage their…

  • AWS EC2 Basics - I

    AWS EC2 Basics - I

    Do you know you can create a simple full-stack web application using some AWS services and a set of tools including a…

    2 Comments
  • Policies and Permissions in Amazon S3

    Policies and Permissions in Amazon S3

    According to AWS documentation; Amazon Simple Storage Service (Amazon S3) is an object storage service that offers…

Insights from the community

Others also viewed

Explore topics