Launching an EC2 Instance on AWS
Follow these steps to create and launch an EC2 instance on AWS:
🚀 Step 1: Log in to AWS Management Console
👉 Go to AWS Console
👉 Sign in with your credentials
🌍 Step 2: Navigate to EC2 Service
🔹 In the AWS search bar, type EC2.
🔹 Click on EC2 under “Services.”
💻 Step 3: Launch a New Instance
🔹 Click Launch Instance (under the “Instances” tab).
🔹 Enter a cool name for your instance (e.g., “MyFirstEC2”).
🎯 Step 4: Choose Your Amazon Machine Image (AMI)
🔹 Select the OS for your instance:
- ✅ Amazon Linux 2 (Free-tier eligible, recommended 🆓)
- ✅ Ubuntu (For DevOps & cloud-based apps 🐧)
- ✅ Windows Server (For Windows-based apps 🖥️)
⚡ Step 5: Pick an Instance Type
🔹 Choose the instance type based on your needs:
- 🔹 t2.micro (1 vCPU, 1GB RAM) – Free-tier eligible 🆓
- 🔹 t3.medium (2 vCPU, 4GB RAM) – Good for testing ⚡
- 🔹 m5.large (2 vCPU, 8GB RAM) – For production workloads 🚀
✅ Tip: For practice, stick with t2.micro (Free Tier).
🔑 Step 6: Configure Key Pair for Secure Access
🔹 Click Create new key pair 🔑
🔹 Give it a name (e.g., “MyKeyPair”).
🔹 Choose .pem format (for SSH) & download it safely.
⚠️ Important: Keep this file safe! You’ll need it to connect via SSH.
🌐 Step 7: Configure Network & Security (Firewall Rules)
🔹 In the Security Group section, select:
- ✅ SSH (Port 22) → To access via terminal 🖥️
- ✅ HTTP (Port 80) → For web traffic 🌐
- ✅ HTTPS (Port 443) → For secure traffic 🔒
📌 Tip: Select “Anywhere (0.0.0.0/0)” for easy access, but be cautious in production environments!
💾 Step 8: Select Storage (EBS Volume)
🔹 Default: 8GB (GP3 SSD) – Free-tier eligible ✅
🔹 Increase if needed (e.g., 30GB for big applications).
🚀 Step 9: Launch the Instance!
🔹 Click Launch Instance and wait a few seconds… ⏳
🔹 🎉 Congratulations! Your EC2 instance is running! 🎉
🔌 Step 10: Connect to Your EC2 Instance
🔹 Click on the Instance ID to view details.
🔹 Copy the Public IP Address (e.g., 52.14.XX.XX).
For Linux/Mac Users 🖥️
Open your terminal & run:
ssh -i MyKeyPair.pem ec2-user@52.14.XX.XX
For Windows Users (Using PuTTY)
- Convert .pem to .ppk using PuTTYgen.
- Open PuTTY, enter the Public IP, and load the .ppk key.
- Click Open to connect! 🎉