DEV Community

Cover image for Ec2 Instance For Beginner
Olatunbosun Salako
Olatunbosun Salako

Posted on

Ec2 Instance For Beginner

Many people want to get started with AWS but aren’t sure where to begin. In this article, I'll introduce you to a service you can start using on AWS, even without being an expert Cloud practitioner.

Image description

Before AWS, companies relied on on-premise servers, which often required significant investment in time, money, and resources to manage. This traditional setup created a lot of challenges for businesses trying to scale efficiently.

AWS, recognizing this problem, introduced a solution that allows companies to focus on their products rather than managing infrastructure. They pioneered cloud computing, offering services on a "Pay As You Go" model, which helps businesses avoid unnecessary expenses and complexity.

What is Ec2 Instance?

In simple terms, EC2 (Elastic Compute Cloud) is like a computer, similar to your PC or laptop, but with the ability to scale based on what you need. Imagine you're buying a laptop: a video editor would look for a machine with high CPU power, memory, and storage, while a programmer might need similar specs. On the other hand, someone who just wants a laptop for watching movies would only care about storage. EC2 works the same way—you choose the type of "computer" you need based on the tasks you want to perform, and it can easily adjust as your requirements grow.

Get started with AWS Ec2

Create an AWS account and Login into your AWS console.

Image description

you will get this Dashboard Home page.

Locate the search button on top of the dashboard

Image description

Input Ec2

Image description

Click on Launch Instance on the ec2 dashboard.

Image description

You get the launch instance page, this is where you input the information requirement for your ec2 instance (computer, laptop). You will provide the name, operating system, instance type, security and firewalls, storage type and size.

Instance Name
Image description

This is the name you wish to give your instance alias computer or laptop. if you creating the instance to host your website you can give the domain name (bosun.com) or the environment eg testing-server, prod-app, dev-app and so on.

Instance Operating System
Then you go ahead to choose the operating system of your choice, either windows, mac, linux (linux distro like ubuntu, kali, centos, Red hat Enterprise Linux (RHEL), Amazon Linux,).

Image description

Here I chose Ubuntu operating system.

Instance Type

The instance type defines the specifications and performance of the virtual machine. Based on your needs, you select the appropriate instance type. It's similar to choosing the processor, chip, and memory for a physical computer, as these determine the power and capacity of the machine you're working with.

Image description

I went for the free tier because of the demo. But in your case, you have to choose what best suit your requirement.

Keypair

Image description

A key pair is used to control access to your instance, similar to how you set a password on your laptop to prevent unauthorized access. It ensures that only people with the correct key pair can connect to the instance. If you're new, your key pair list will be empty since you haven't created one yet. Below is an illustration of how to create a key pair.

Click on create new key-pair
Image description

Input key name and create key pair

Image description

Network Settings

This is where you specify the VPC (Virtual Private Cloud) and subnet where your instance will be created. To simplify, think of a VPC as a parking lot, and the subnet as the different sections of that parking lot, each reserved for different types of vehicles (like spaces for vans, cars, trucks, etc.). When you launch an instance, you're deciding where it will "park" in the network, just like you would park your car in a designated space in a parking lot.

Image description

You create a firewall, known as a Security Group, to control and restrict access to your instance or server. It ensures that only trusted connections can reach your instance, blocking any untrusted or unauthorized access attempts. This adds a vital layer of security to your environment. For example, you can configure your Security Group to allow only specific types of traffic, such as SSH (port 22), HTTPS (port 443), and HTTP (port 80), depending on your requirements.

Storage

Image description

You specify the amount of storage you need for your instance, whether it's 10GB, 20GB, 30GB, or more, depending on your requirements. You also choose the storage type, such as SSD (Solid State Drive) for faster performance or HDD (Hard Disk Drive) for more cost-effective storage, based on the workload and use case.

After you have provided all information click on launch instance button on the bottom right corner.

Viola!! you have created an ec2 instance ready to do anything for you.

Image description

Welcome To Amazon Web Service
Getting started with AWS might seem overwhelming, but with the right understanding of core services like EC2, VPCs, Security Groups, and storage, you can quickly launch and manage cloud infrastructure tailored to your needs. AWS's flexibility allows you to scale resources efficiently and focus on your projects without worrying about complex server management.

As you continue exploring AWS, remember that cloud computing is about using the right tools for the job—whether it’s scaling your instance types, securing your infrastructure, or optimizing storage. Take the next step by experimenting with these services and see how they can streamline your work.

Top comments (0)