Cloud Computing & EC2 Deep Dive | DevOps Learning Log
DevOps Learning Log
๐น Cloud Computing Basics
What Is Cloud Computing?
Cloud computing is the delivery of computing services (servers, storage, networking, databases, etc.) over the internet on a pay-as-you-go basis.
Why Cloud?
Elasticity: Scale resources up/down automatically
Cost-Effective: No capex, pay for what you use
Global Reach: Deploy in multiple regions
High Availability: Redundancy via Availability Zones
Speed: Provision resources within minutes
๐น Cloud Models
Service Models:
IaaS (e.g., EC2): Manage OS and everything on top
PaaS (e.g., Elastic Beanstalk): Just to deploy code
SaaS (e.g., Gmail): Fully managed end-user apps
Deployment Models:
Public Cloud (AWS, GCP)
Private Cloud (on-prem, VMware)
Hybrid Cloud (combo of both)
๐น AWS Overview
AWS = Most widely adopted cloud platform
Regions = Geographical locations (e.g.,
ap-south-1)Availability Zones (AZs) = Isolated data centers within a region
Edge Locations = Used by CloudFront for CDN caching
๐น EC2 (Elastic Compute Cloud)
Core Concepts
AMI (Amazon Machine Image): Pre-configured OS + software
Instance Types: Compute configs (vCPU, RAM, etc.)
Pricing Models:
On-Demand: Pay per hour/second
Reserved: 1-3 year commitment, discounted
Spot: Up to 90% cheaper, but can be interrupted
Savings Plan: Flexible savings commitment
Networking:
Public IP: Dynamic, changes on stop/start
Private IP: Stays within VPC
Elastic IP: Static public IP you can remap
Instance Lifecycle: pending โ running โ stopped/terminated
Placement Groups:
Cluster: Low latency, high throughput
Spread: Instances on separate racks
Partition: Split across partitions for failure isolation
Security Group: Stateful firewall at instance level
Key Pair: SSH authentication (PEM file used to connect)
๐น Hands-On Summary
Launched an EC2 instance using:
Ubuntu 22.04 AMI
t2.micro (free tier)
Custom security group (allow SSH from my IP)
Connected via SSH using
.pemkeyTerminated the instance post-use
Also tested:
Elastic IP allocation & reassignment
Instance stop/start behavior on public IP