Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
AWS Cloud Computing Cloud Computing: From Zero to Production EC2 Module 2 — AWS Fundamentals

EC2 — Launching Your First Virtual Server

Reviewed & accurate
AI Summary

What You Will Learn

Beginner

  • How to launch an EC2 instance
  • How to configure security groups
  • How to connect via SSH

EC2 (Elastic Compute Cloud) is AWS virtual server service. You rent a virtual machine by the hour (or second) and run anything on it.

Key Concepts

TermMeaning
AMIAmazon Machine Image — the OS template (Ubuntu, Amazon Linux, etc.)
Instance typeSize of the VM (t2.micro = 1 CPU, 1GB RAM — free tier)
Security groupFirewall rules (which ports are open)
Key pairSSH key for connecting to the instance

Launch Steps

Go to EC2 -> Launch Instance
Choose AMI: Amazon Linux 2 (free tier eligible)
Choose instance type: t2.micro (free tier)
Configure: leave defaults, enable auto-assign public IP
Add storage: 8 GB (default)
Create security group: allow SSH (port 22) from your IP
Create or select a key pair (download .pem file)
Click "Launch instance"

Connect via SSH

Terminalbash
# Set permissions on your key
chmod 400 my-key.pem

# Connect
ssh -i my-key.pem ec2-user@PUBLIC_IP

# Inside the instance
uname -a
sudo yum update -y

Practical Exercise

Launch a t2.micro EC2 instance with Amazon Linux 2
Connect via SSH using the .pem key
Run uname -a inside the instance
Run sudo yum update -y
Terminate the instance when done (to avoid charges)

Key Takeaways

  • EC2 = virtual server, pay per hour/second.
  • AMI = OS template. Instance type = size. Security group = firewall.
  • Free tier: t2.micro, 750 hours/month for 12 months.
  • Connect via SSH: ssh -i key.pem ec2-user@IP
  • ALWAYS terminate instances when done — running instances cost money.
Previously: Lesson 10 covered the CLI.
Today: You learned: Launch and connect to your first EC2 server.
Next: Lesson 12 covers S3 storage.
Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments