DevOps Lesson 8: Cloud — AWS Basics
AWS is the world’s #1 cloud provider. Understanding core services is required for most DevOps/backend roles. AWS Free Tier lets you practice for free.
Core Services
// Compute:
// EC2: Virtual servers (like a rented Linux computer in the cloud)
// Lambda: Serverless functions (pay per call, auto-scales)
// ECS/EKS: Run Docker containers
// Storage:
// S3: Object storage (files, images, backups, static sites)
// EBS: Block storage (hard drives for EC2)
// RDS: Managed relational databases (PostgreSQL, MySQL)
// ElastiCache: Managed Redis/Memcached
// Networking:
// VPC: Virtual Private Cloud (isolated network)
// Route 53: DNS (domain name to IP)
// CloudFront: CDN (cache content globally)
// Load Balancer: distribute traffic across servers
// Security:
// IAM: Users, roles, permissions
// Security Groups: Firewall rules
// Secrets Manager: Store API keys and passwords
Deploy Node.js to EC2
# 1. Launch EC2 instance (t2.micro = free tier)
# Select: Ubuntu 22.04
# Create key pair: mykey.pem
# 2. Connect:
ssh -i mykey.pem ubuntu@your-ec2-ip
# 3. Setup:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
npm install -g pm2 # process manager
# 4. Deploy your app:
git clone https://github.com/you/your-app
cd your-app
npm install
pm2 start app.js --name myapp
pm2 startup # auto-start on reboot
# 5. Configure security group: open port 80, 443, 22
🏋️ Practice Task
Create a free AWS account. Launch a t2.micro EC2 Ubuntu instance. SSH into it. Install Node.js. Deploy your tasks API. Access it via the public IP. Create an S3 bucket and upload a file to it (make it public). View the file URL.
💡 Hint: Free tier: 750 hours/month EC2, 5GB S3. Add your IP to security group inbound rules on port 22 and 3000.