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.
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.
Under Name and tags, for Name, enter a descriptive name for your instance. You can also add a tag but it is optional.
Under Application and OS Images (Amazon Machine Image), do the following:
Recommended by LinkedIn
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.
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.
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:
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.
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.
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.
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.
AWS | K8s | Docker | SQL | Python | Linux | Git |
2yThanks 👍
--
2yInsightful content