Launching your first virtual server on AWS is easier than you think. In this comprehensive beginner-friendly guide, we walk you through every step of creating a free Amazon EC2 instance using the AWS Free Tier. From account setup and region selection to choosing the right AMI and accessing your instance via SSH, this tutorial covers all the essential steps. Whether you're a student, developer, or hobbyist, you’ll learn how to spin up a secure, cost-free cloud server in just minutes—ideal for hosting websites, running scripts, or learning cloud computing.
How to Launch an EC2 Instance on AWS (Free Tier Guide)
By: H.R.
08/07/2025
Learn how to launch a free EC2 instance on AWS using the Free Tier. This step-by-step guide covers everything from signing up for AWS to setting up your virtual server with Ubuntu or Amazon Linux, perfect for beginners.
How to Launch an EC2 Instance on AWS (Free Tier Guide)
Your step-by-step guide to deploying virtual servers in the cloud, even as a beginner!
Introduction to AWS EC2 and the Free Tier
Welcome to the world of cloud computing! Amazon Web Services (AWS) is the leading cloud platform, offering a vast array of services. Among its most fundamental and widely used services is Amazon Elastic Compute Cloud (EC2). Think of EC2 as a virtual server (or "instance") in the cloud, allowing you to run applications, host websites, and perform various computing tasks without needing to buy or maintain physical hardware.
For newcomers, AWS generously offers a Free Tier, which allows you to experiment with many services, including EC2, for a limited usage amount, at no cost. This guide will specifically focus on launching an EC2 instance that falls under the Free Tier eligibility, helping you avoid unexpected charges while you learn and build.
Prerequisites
- An AWS Account: If you don't have one, you'll need to create it. AWS requires a credit card for verification, even for Free Tier usage, but you won't be charged unless you exceed the Free Tier limits.
- Basic understanding of Operating Systems (OS): Knowing whether you prefer Linux (e.g., Ubuntu, Amazon Linux) or Windows will help in selecting your instance.
- A Terminal/SSH Client (for Linux instances): Tools like PuTTY (Windows) or the built-in Terminal (macOS/Linux) will be used to connect.
Step-by-Step Guide: Launching Your EC2 Instance
Step 1: Log in to the AWS Management Console
Go to console.aws.amazon.com and log in with your AWS account credentials.
Step 2: Navigate to EC2 Dashboard
Once logged in, type "EC2" into the search bar at the top of the console and select "EC2" from the results. This will take you to the EC2 Dashboard.
Step 3: Launch an Instance
On the EC2 Dashboard, click the prominent orange button that says "Launch instance".
Step 4: Name and Tags
Give your instance a descriptive name (e.g., "MyFreeTierWebserver"). You can also add tags (key-value pairs) for organization, though it's optional for a first instance.
Step 5: Choose an Amazon Machine Image (AMI)
An AMI is a template that contains the software configuration (operating system, application server, and applications) required to launch your instance.
- Under "Application and OS Images (Amazon Machine Image)", browse or select an AMI.
- Crucially, look for AMIs labeled "Free tier eligible". Popular choices include "Amazon Linux 2023 AMI" or "Ubuntu Server 22.04 LTS".
Step 6: Choose an Instance Type
The instance type determines the hardware of your virtual server.
- Under "Instance type", select an instance type that is "Free tier eligible". The most common choice is `t2.micro` (or `t3.micro` in some regions/accounts).
- Avoid selecting other instance types unless you intend to pay for them, as they are not covered by the Free Tier.
Step 7: Create a New Key Pair
A key pair is essential for securely connecting to your instance.
- Under "Key pair (login)", click "Create new key pair".
- Give it a name (e.g., `my-ec2-key`).
- Choose "RSA" for "Key pair type" and ".pem" for "Private key file format".
- Click "Create key pair". Your browser will automatically download the `.pem` file. Keep this file secure and do not share it! You cannot download it again.
Step 8: Configure Network Settings (Security Group)
A security group acts as a virtual firewall for your instance, controlling inbound and outbound traffic.
- Under "Network settings", click "Edit".
- For "Firewall (security groups)", choose "Create security group".
- Give it a "Security group name" (e.g., `web-server-sg`) and a "Description".
- Add rules:
- SSH: This is crucial for connecting to your Linux instance. Set "Type" to "SSH", "Source type" to "My IP" (recommended for security to allow only your current IP), or "Anywhere" (less secure, allows connections from any IP).
- (Optional) HTTP/HTTPS: If you plan to host a web server, add rules for "HTTP" (port 80) and "HTTPS" (port 443), setting "Source type" to "Anywhere" (0.0.0.0/0).
Step 9: Configure Storage
This is where you define the hard disk for your instance.
- Under "Configure storage", the default root volume size is usually 8 GiB, which is well within the Free Tier limit (30 GB of EBS General Purpose SSD).
- You can increase this up to 30 GiB and still remain Free Tier eligible. Avoid going over 30 GiB combined for all EBS volumes.
Step 10: Review and Launch
On the right-hand side, you'll see a "Summary" section. Review all your configurations to ensure they align with your requirements and, most importantly, with Free Tier eligibility. When satisfied, click the orange "Launch instance" button.
A success message will appear, and you can click "View all instances" to see your new instance. It will initially be in a "pending" state and then transition to "running".
Connecting to Your EC2 Instance
Connecting via SSH (for Linux Instances)
Once your instance state changes to "running":
- Select your instance from the EC2 Instances list.
- Click the "Connect" button.
- Go to the "SSH client" tab. AWS will provide an example command. It will look something like this:
ssh -i "your-key-pair-name.pem" ec2-user@your-instance-public-ip
* Replace `your-key-pair-name.pem` with the name of your downloaded key file and `your-instance-public-ip` with your instance's Public IPv4 address (found in the instance details tab).
- Open your terminal (or PuTTY for Windows).
- Navigate to the directory where you saved your `.pem` file.
- For Linux/macOS: Change the permissions of your key pair file:
chmod 400 your-key-pair-name.pem
- Paste the SSH command provided by AWS and press Enter. You should now be connected to your EC2 instance!
Connecting via EC2 Instance Connect (Browser-based)
For a simpler, browser-based connection to Linux instances, use EC2 Instance Connect:
- Select your instance from the EC2 Instances list.
- Click the "Connect" button.
- Select the "EC2 Instance Connect" tab.
- Ensure the "User name" is correct (e.g., `ec2-user` for Amazon Linux, `ubuntu` for Ubuntu).
- Click "Connect". A new browser window will open with a terminal connected to your instance.
Important Free Tier Considerations and Best Practices
- Monitor Usage: Regularly check the AWS Free Tier Usage page in the Billing & Cost Management console. This dashboard shows how much of your free tier you've consumed.
- Set up Billing Alerts: Use AWS Budgets to set up alerts that notify you when your usage approaches or exceeds Free Tier limits. This is crucial for avoiding unexpected costs.
- Stop vs. Terminate:
- Stopping an instance means it's powered off but still consumes storage (EBS volume) and retains its public IP (if elastic IP is attached). You won't be charged for compute hours, but storage charges still apply if you exceed Free Tier.
- Terminating an instance permanently deletes the instance and its associated EBS volume (unless you specifically configure otherwise). This ensures no further charges for that instance. Only terminate if you are sure you no longer need the instance or its data.
- Data Transfer: Be mindful of data transfer out of AWS. While there's a free tier for data transfer, exceeding it can incur significant costs.
- Security Best Practices:
- Always use "My IP" for SSH source in security groups when possible.
- Never share your `.pem` key file.
- Enable Multi-Factor Authentication (MFA) on your AWS root account.