DEV Community

Cover image for How to Launch an EC2 Instance in AWS
Samuel Ojo
Samuel Ojo

Posted on

How to Launch an EC2 Instance in AWS

Amazon EC2 (Elastic Compute Cloud) lets you spin up virtual servers in minutes. If you're new to AWS or just need a quick refresher, this guide walks you through the exact steps to launch your first EC2 instance with screenshots from the AWS console to make things even clearer.

Key Terms You Should Know:
Amazon EC2: A web service that provides resizable virtual servers in the cloud. You can run applications, host websites, or experiment with development environments without managing physical hardware.

Instance: A virtual machine running on AWS. It has its own CPU, memory, storage, and network configuration.

AMI (Amazon Machine Image): A preconfigured template used to launch an EC2 instance. It includes the operating system and optional software packages.

Instance Type: Defines the hardware resources for your instance — CPU, RAM, network performance, etc.
Examples: t2.micro, t3.medium, m5.large.

VPC (Virtual Private Cloud): A logically isolated network within AWS where your resources live. You control IP ranges, routing, and security.

Subnet: A segment of your VPC. Instances must be launched inside a subnet, which can be public (internet‑accessible) or private.

Security Group: A virtual firewall that controls inbound and outbound traffic for your instance.
Example: Allowing SSH on port 22.

Key Pair: A cryptographic key used to securely connect to your EC2 instance.
You download the private key (.pem file) and AWS stores the public key.

EBS (Elastic Block Store): Persistent storage attached to your EC2 instance. It behaves like a virtual hard drive.

Public IP Address: An internet‑reachable IP assigned to your instance. You use it to SSH or access hosted applications.

IAM (Identity and Access Management): AWS service for managing users, roles, and permissions. Controls who can access what.

Free Tier: This is AWS limited free usage offering for new accounts. Includes 750 hours/month of t2.micro or t3.micro EC2 usage.

Steps:
1.Open your AWS Console and type EC2 to the search bar and select the first option from the list of the options it displays.

Search EC2

2.Click launch instance.

launch instance

3.In the Launch Instance Environment, in the name bar, type in a name and click Add additional tags.

4.In the Name and Tag Section, for the Key info and value info Bar, type in while for the Resource Types, click the drop-down arrow and select Instances.

6.In the Application and OS Images (Amazon Machine Images), select any of the Operating systems you want, though I will choose Windows Microsoft.

Windows OS

5.In the Key Pair (Login) section, click Create new key pair and fill in the necessary information on the new bar that pops up

Key Pair section

Create new key pair

7.In the Network Setting Section, tick the Allow RDP traffic from and Allow HTTP traffic from the Internet

Allow RDP traffic

8.Click Launch Instance.

Launch Instance

9.Successfully initiated launch of instance will be displayed on your screen

Successfully initiated launch of instance

10.Click Connect to Instance.

Connect to Instance

11.In the Connect Environment, click the RDP Client Tab

RDP Client

12.Scroll down and click get password and then Click upload private key file and select the key pair you downloaded

get password

upload private key file

13.Click Decrypt Password.

Decrypt Password

Copy the password to your clipboard because it will be needed.

14.Click the download remote desktop file and copy the password.

download remote desktop file

15.In the Connection security environment, click Connect.

click Connect

16.Insert the copied password into the security environment, click OK, and click Yes for the subsequent pop-up. The EC2 instance is then up and running.

EC2 instance

Connect RDP

Tekview Server launched

Conclusion
Launching an EC2 instance is one of the foundational skills in AWS. Once you understand AMIs, instance types, key pairs, and security groups, the rest of the AWS ecosystem becomes much easier to navigate. With your instance now running, you can deploy apps, host websites, run scripts, or explore more advanced AWS services.

Thanks for reading, see you in the next one

Top comments (0)