DEV Community

Cover image for Creating EC2 Instance
daniel shaibu
daniel shaibu

Posted on

Creating EC2 Instance

An EC2 is the counterpart of the virtual machine in Azure but the EC2 is deploy by Amazon Web Service.

  1. Log in to the AWS Management Console
  • Go to the AWS Console.
  • Search for EC2 in the services search bar and Open the EC2 Dashboard.
  1. Launch a New Instance
  • Click Launch Instance.

  • Give your instance a Name (e.g., MyWebServer).

  1. Choose an Amazon Machine Image (AMI) This defines your OS.

Common choices: Amazon Linux 2, Ubuntu Server, Windows Server

  1. Select an Instance Type
    Determines CPU, RAM, and performance.
    For testing: t2.micro or t3.micro (Free Tier eligible).

  2. Configure Key Pair (SSH Access)

  • Create a new key pair or use an existing one.

  • Download the .pem file — you’ll need it to SSH into the instance.

  1. Configure Network Settings
  2. Choose a VPC and Subnet.
    Enable Auto-assign Public IP if you want internet access.
    Configure Security Group: Allow SSH (port 22) for Linux, allow RDP (port 3389) for Windows, allow HTTP (port 80) if hosting a website.

  3. Configure Storage
    Default is usually 8GB gp3. Increase if your workload needs more space.

  4. Launch the Instance
    Review settings. Click Launch Instance.
    Wait for the instance state to become Running.

  5. Connect to Your Instance

  • For Windows:
    Download the RDP file.



  • Decrypt the admin password using your key pair.

  • Download remote desktop file and copy the password

  1. Your EC2 Instance Is Ready You can now install software, deploy apps, or configure it as a server.

Top comments (0)