How to Create a Virtual Machine on AWS EC2 | Launching Your First AWS EC2 Instance (Free Tier)(2025)



Want to set up a **free AWS EC2 virtual machine**? 🚀 This tutorial walks you through **creating an AWS EC2 instance using the AWS Free Tier**—perfect for beginners exploring **cloud computing** and **server hosting**! By the end of this video, you’ll learn: ✅ How to **sign up for AWS Free Tier** ✅ How to **launch an EC2 instance** (Virtual Machine) ✅ How to **configure security groups & SSH access** ✅ How to **connect to your EC2 instance** ✅ How to **stop, start, and terminate** your instance — ## **🔹 What You’ll Learn in This Video:** ✔️ How to **create an AWS account** ✔️ How to **launch an AWS EC2 instance** ✔️ How to choose the right **Amazon Machine Image (AMI)** ✔️ How to connect to your VM using **SSH (Linux/Mac) or PuTTY (Windows)** ✔️ How to manage your instance efficiently — ## **🔹 Prerequisites** ✔️ A **Free AWS Account** ([Sign Up](https://aws.amazon.com/free/)) ✔️ Basic knowledge of **cloud computing** ✔️ A system with **SSH (Mac/Linux) or PuTTY (Windows)** — ## **🔹 Step 1: Sign Up for AWS Free Tier** 1️⃣ Go to [AWS Free Tier](https://aws.amazon.com/free/) 2️⃣ Click **Create an AWS Account** 3️⃣ Enter your **email, password, and account details** 4️⃣ Add a **payment method** (AWS Free Tier is free, but verification requires a card) 5️⃣ Verify your **phone number** 6️⃣ Choose **Basic Free Plan** — ## **🔹 Step 2: Launch an EC2 Instance (Virtual Machine)** 1️⃣ **Login to AWS Console** → Open **EC2 Dashboard** 2️⃣ Click **Launch Instance** 3️⃣ Choose an **Amazon Machine Image (AMI)**: – **Ubuntu 22.04 LTS** – **Amazon Linux 2** (Best for AWS-native applications) – **Windows Server** (For Windows-based applications) 4️⃣ Select **Instance Type**: – **t2.micro** (FREE for 750 hours/month) 5️⃣ Configure **Storage (8GB default for Free Tier)** 6️⃣ **Create a Key Pair** (Download the `.pem` file for SSH access) 7️⃣ Configure **Security Group**: – Allow **SSH (port 22)** for Linux – Allow **RDP (port 3389)** for Windows 8️⃣ Click **Launch** 🚀 — ## **🔹 Step 3: Connect to Your EC2 Instance** ### **For Windows (Using PuTTY)** 1️⃣ Download **PuTTY & PuTTYgen** ([Download Here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)) 2️⃣ Open **PuTTYgen**, load the `.pem` file, and save it as `.ppk` 3️⃣ Open **PuTTY**, enter your **EC2 Public IP Address** 4️⃣ In SSH → Auth, browse and add the `.ppk` file 5️⃣ Click **Open** and login as `ubuntu` — ### **For Mac & Linux (Using Terminal)** Run this command: “`bash
chmod 400 your-key.pem
ssh -i your-key.pem ubuntu@your-ec2-public-ip
“` 💡 Replace `your-key.pem` with your actual key file name and `your-ec2-public-ip` with your instance’s IP. — ## **🔹 Step 4: Manage Your EC2 Instance** ✔️ **Stop the Instance (Pause, No Charges for Compute Time):** “`bash
aws ec2 stop-instances –instance-ids i-xxxxxxxxxxxxxxxxx
“` ✔️ **Start the Instance Again:** “`bash
aws ec2 start-instances –instance-ids i-xxxxxxxxxxxxxxxxx
“` ✔️ **Terminate the Instance (Permanently Delete):** “`bash
aws ec2 terminate-instances –instance-ids i-xxxxxxxxxxxxxxxxx
“` — ## **🔹 Common Issues & Fixes** 🔹 **Permission denied (publickey) error?** ✅ **Fix:** Ensure your **key file permissions** are correct: “`bash
chmod 400 your-key.pem
“` 🔹 **Cannot connect to EC2 instance?** ✅ **Fix:** Check your **security group settings** and allow **SSH (port 22)**. 🔹 **No public IP assigned?** ✅ **Fix:** Enable **Auto-assign Public IP** during instance setup. — ## **🔹 Who Is This Tutorial For?** ✅ **Beginners** exploring AWS Free Tier ✅ **Developers** deploying web applications ✅ **System Administrators** setting up cloud-based servers — ## **🔹 More AWS Tutorials:** 📌 **How to Deploy a Flask App on AWS EC2** → [Watch Now] 📌 **How to Setup an AWS RDS MySQL Database** → [Watch Now] 📌 **How to Connect AWS EC2 with a Custom Domain** → [Watch Now] — ## **👍 Like, Share & Subscribe!** If this tutorial helped you, please **LIKE, SHARE, and SUBSCRIBE** for more **AWS, Cloud, and DevOps tutorials**! 🚀 💬 Have questions? Drop them in the **comments** below! — ### **🔹 Hashtags:** #AWS #EC2 #VirtualMachine #CloudComputing #AWSFreeTier #DevOps #Cloud #Linux #AWSCloud #SysAdmin Now you know how to **launch a free AWS EC2 instance** and start working with cloud servers! 🚀💻