How To Create An EC2 Instance in AWS.

Published: (December 14, 2025 at 10:02 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Cover image for How To Create An EC2 Instance in AWS.

Launch Your Digital Frontier: The Ultimate Guide to Creating Your First AWS EC2 Instance

In the modern digital landscape, the ability to rapidly deploy and scale computing resources is a necessity. AWS Elastic Compute Cloud (EC2) lets you rent virtual servers—called instances—on Amazon’s robust infrastructure, giving you control over virtually every aspect of your compute environment. Whether you’re hosting a high‑traffic website, deploying a machine‑learning model, or testing a new application, this guide will walk you through the essential steps to launch your very first EC2 instance.

Step‑by‑Step: Launching the EC2 Instance

A. Navigate to the EC2 Dashboard

  • Log in to the AWS Management Console and click Launch Instance.

EC2 dashboard Launch Instance button

B. Choose a Name and an Amazon Machine Image (AMI)

  • Give the server a descriptive name.
  • Select an AMI, which serves as the template for the instance’s operating system and initial content.

Name and AMI selection Naming the instance

C. Choose an Instance Type

  • Pick the hardware configuration (CPU, RAM, storage, network performance).
  • For the Free Tier, select t2.micro or t3.micro.

Instance type selection

D. Create a Key Pair

  • Generate a new key pair (or use an existing one).
  • Download the private key file (.pem) to your computer; you’ll need it to connect to the instance.

Create key pair Key pair download prompt Saving the key file

E. Configure Network Settings and Firewall

  • Accept the default VPC and subnet settings.
  • In the security group, allow RDP (port 3389) and HTTP (port 80) traffic (or adjust ports as needed).

Network and security settings

F. Launch the Instance

  • Review your configuration and click Launch Instance.

Launch confirmation

G. Retrieve the Administrator Password (Windows Instances)

  1. In the EC2 console, select Connect, then choose RDP client.
  2. Click Get Password.
  3. Upload the previously downloaded .pem key pair file.
  4. Decrypt the password to obtain the Windows administrator credentials.

Get password screen Upload key pair file Decrypted password

Back to Blog

Related posts

Read more »

Creating an EC2 Instance

Steps 1. Search bar, type EC2 and choose the first option. 2. Click Launch Instance. 3. In the Launch Instance Environment, enter a name in the name bar and cl...

Getting Started with AWS CloudFormation

!Cover image for Getting Started with AWS CloudFormationhttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F...