AWS BASIC
☁️ AWS (Amazon Web Services) – Complete Core Notes
Cloud Fundamentals, Compute (EC2), Object Storage (S3), Security (IAM), Managed Databases aur Networking ka practical reference guide.
1️⃣ AWS Kya Hai?
Definition: Amazon Web Services (AWS) duniya ka sabse comprehensive aur widely-used cloud computing platform hai jo on-demand computing power, storage, databases aur networking capabilities internet ke through deliver karta hai.
- Pay-as-you-go Pricing: Jitna resource jitne ghanto ke liye use hoga, sirf utna hi payment karna padta hai (No upfront capital expense).
- Elastic Scalability: Traffic aane par servers automatically scale-up ho jate hain aur traffic kam hone par scale-down (Auto Scaling).
- Global Presence: Duniya bhar me spread Regions aur Availability Zones (AZs) ke sath high availability aur disaster recovery provide karta hai.
2️⃣ AWS Core Service Domains
| Domain | Core AWS Services | Primary Function |
|---|---|---|
| Compute | EC2, Lambda, ECS |
Virtual machines run karna aur event-driven serverless code execute karna. |
| Storage | S3, EBS, EFS |
Static files, virtual disks aur scalable shared file storage manage karna. |
| Database | RDS, DynamoDB |
Managed Relational (SQL) aur NoSQL serverless databases host karna. |
| Networking | VPC, Route 53, CloudFront |
Isolated private cloud networks, DNS routing aur global CDN content delivery. |
| Security | IAM, KMS, Security Groups |
User authentication, roles, encryption keys aur firewall firewall rules. |
3️⃣ AWS Account Setup & Console
- AWS Portal: aws.amazon.com par jaakar "Create an AWS Account" select karein.
- Free Tier Benefits: Naye accounts ko 12 mahine tak
t2.micro / t3.microEC2 instance (750 hours/month) aur 5GB S3 standard storage free milta hai. - Root User Protection: Account bante hi root user par MFA (Multi-Factor Authentication) enable karein aur daily work ke liye individual IAM users create karein.
- Management Console: Web dashboard jahan se 200+ AWS cloud services search aur configure ki jaati hain.
4️⃣ Key Services At A Glance
| Service Name | Type | Industrial Use-Case |
|---|---|---|
| EC2 (Elastic Compute Cloud) | IaaS (Compute) | Web applications, Node/Python backends aur customized OS servers host karna. |
| S3 (Simple Storage Service) | Object Storage | Images, videos, static React/HTML websites aur automated backups store karna. |
| RDS (Relational Database) | Managed DB | MySQL, PostgreSQL ya MariaDB jisme automated patch aur backup AWS handle karta hai. |
| AWS Lambda | Serverless FaaS | Bina server manage kiye direct code execute karna (Pay per invocation). |
| Route 53 | DNS Management | Custom domain names ko AWS EC2 ya CloudFront se connect karna. |
Managed RDS Database: $18.00/mo
Estimated Total Cloud Infrastructure Spend: ~$35.30 / month
5️⃣ EC2 (Elastic Compute Cloud) Workflow
Virtual server launch karne ka 4-step deployment cycle:
- AMI Selection: OS choose karein (Ubuntu 24.04 LTS, Amazon Linux 2023, RedHat).
- Instance Sizing: Workload ke mutabiq CPU aur RAM configure karein (e.g.
t3.micro). - Security Group (Firewall): Inbound traffic rules define karein:
Port 22(SSH) → Server command access ke liye (Restrict to My IP).Port 80 / 443(HTTP/HTTPS) → Public website access ke liye (0.0.0.0/0).
- Key Pair & SSH Connect: Private key (
.pemfile) download karke terminal se connect karein:
# Linux / Mac / WSL Terminal se connect karein
chmod 400 my-key.pem
ssh -i "my-key.pem" ubuntu@ec2-public-ip-address
6️⃣ S3 (Simple Storage Service)
Definition: 99.999999999% (11 9's) durability provide karne wala highly-reliable object storage system.
- Buckets: Files store karne ke top-level containers (Bucket name poore globally unique hona mandatory hai).
- Storage Classes: S3 Standard (Frequent access), S3 Infrequent Access (IA), aur S3 Glacier (Long-term cheap backup).
# AWS CLI se S3 buckets manage karna
aws s3 mb s3://my-unique-app-bucket-2026 # Create bucket
aws s3 cp document.pdf s3://my-unique-app-bucket-2026/ # Upload file
aws s3 sync ./build s3://my-react-website/ # Deploy React frontend
7️⃣ IAM (Identity & Access Management)
Definition: AWS environment me authentication (kaun login kar sakta hai) aur authorization (kya access kar sakta hai) control karne wali security backbone.
| IAM Entity | Concept | Industry Best Practice |
|---|---|---|
| IAM Users | Organization ke actual developers ya administrators. | Root user credentials daily use me lock rakhein. |
| IAM Roles | Temporary credentials jo services (jaise EC2 ya Lambda) ko assign hote hain. | Hardcoded API keys code me commit karne ke bajay IAM Roles attach karein. |
| IAM Policies | JSON documents jo explicit permissions grant ya deny karte hain. | Principle of Least Privilege: Sirf utni hi access dein jitni kaam ke liye zaroori ho. |