AWS Builder Center

Launching an Amazon EC2 (Elastic Compute Cloud) instance

Launching an Amazon EC2 instance allows you to set up virtual servers in the cloud. Below is a step-by-step guide to launching a basic EC2 instance using the AWS Management Console.

If you are just getting started with AWS, the sheer number of services can feel a bit overwhelming. But don't worry—almost every cloud engineer starts in the exact same place: launching a virtual server using Amazon EC2 (Elastic Compute Cloud).
In this quick walk through, we’ll set up a basic EC2 instance step-by-step using the AWS Management Console. By the end of this guide, you'll have your very own server running in the cloud!

Step 1: Head to the EC2 Dashboard

  1. Log in to your AWS Management Console.
  2. In the top search bar, type EC2 and select it from the drop-down.
  3. Click the bright Launch Instance button to get started.

Step 2: Give Your Server a Name

Under the Name and tags section, type in a name for your virtual machine. It can be anything you like, such as 'test' or 'your name'.

Step 3: Pick an Operating System (AMI)

Scroll down to Application and OS Images. This is where you choose the operating system for your server.
  • Pro Tip for Beginners: Select Amazon Linux 2023 or Ubuntu. Keep an eye out for the Free tier eligible badge right below the OS options so you don't incur unexpected costs.

Step 4: Select Your Instance Type

The instance type defines how much processing power and RAM your server will have.
  • Select t2.micro (or t3.micro, depending on your region). This gives you 1 vCPU and 1 GiB of memory—plenty of power for learning and testing, and completely covered under the AWS Free Tier.

Step 5: Set Up a Key Pair (So You Can Log In)

A key pair acts like a secure digital key that allows you to safely log into your server later.
  1. Click Create new key pair.
  2. Give it a name (e.g., my-ec2-key).
  3. Leave the type as RSA and format as .pem.
  4. Click Create key pair and download the file.
Look out for pay-as-you-go model as this can incur costs accordance to the service used per time and availability zone.

Step 6: Configure Your Security Group (Virtual Firewall)

Security groups control who can talk to your server over the network.
  1. Select Create security group.
  2. Check Allow SSH traffic from and set the dropdown to My IP. This ensures only your computer can log into the server.
  3. (Optional) Check Allow HTTP traffic from the internet if you plan on building a simple website on this instance.

Step 7: Launch Your Server!

  1. Leave the default storage settings as they are (8 GB of SSD storage is plenty for starting out).
  2. Take a quick look at the Summary panel on the right side to make sure everything looks good.
  3. Hit Launch Instance.

Step 8: Verify It’s Running

  1. Click on the Instance ID in the green success banner.
  2. Look at the Instance state column. It will say Pending for a minute or two before turning into a green Running.
  3. Once it's running, click on your instance to grab its Public IPv4 address. You're all set!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article