AWS Core Concepts
Understand AWS regions, core services, IAM permissions, and how everything connects before deploying your first app.
What you'll accomplish
Clear mental model of how AWS services work together
Prerequisites
- AWS account configured (previous lessons)
The AWS Mental Model
Before deploying anything, let's build a mental model of how AWS works. This will save you hours of confusion later.
Regions and Availability Zones
What is a Region?
A region is a geographic area containing AWS data centers. Each region is completely independent - your resources in us-east-1 (Virginia) don't automatically exist in eu-west-1 (Ireland).
World Map of AWS Regions (simplified)
┌─────────────────────────────────────────────────────────────┐
│ │
│ us-west-1 ● us-east-1 ● eu-west-1 ● │
│ (California) (Virginia) (Ireland) │
│ │
│ us-west-2 ● us-east-2 ● eu-central-1 ● │
│ (Oregon) (Ohio) (Frankfurt) │
│ │
│ sa-east-1 ● ap-northeast-1 ● │
│ (São Paulo) (Tokyo) │
│ │
└─────────────────────────────────────────────────────────────┘
Choosing a Region
| Factor | Recommendation |
|---|---|
| Latency | Choose a region close to your users |
| Cost | us-east-1 is often cheapest |
| Compliance | EU data may require EU regions (GDPR) |
| Service availability | New services launch in us-east-1 first |
Note
For learning and personal projects, us-east-1 is the safest choice - it has the most services and best documentation examples.
What are Availability Zones?
Each region has multiple Availability Zones (AZs) - physically separate data centers with independent power and networking.
Region: us-east-1
├── us-east-1a (AZ 1)
├── us-east-1b (AZ 2)
├── us-east-1c (AZ 3)
├── us-east-1d (AZ 4)
├── us-east-1e (AZ 5)
└── us-east-1f (AZ 6)
For high availability, deploy resources across multiple AZs. If one data center fails, others keep running.
Core AWS Services
AWS has 200+ services. Here are the ones you'll actually use:
Compute (Running Your Code)
| Service | What It Does | When to Use |
|---|---|---|
| EC2 | Virtual machines | Full control, any workload |
| ECS | Container orchestration | Running Docker containers |
| Fargate | Serverless containers | Containers without managing servers |
| App Runner | Simple container hosting | Fastest path to deploy a container |
| Lambda | Serverless functions | Event-driven, short tasks |
Storage
| Service | What It Does | When to Use |
|---|---|---|
| S3 | Object storage | Files, images, backups, static websites |
| EBS | Block storage | Hard drives for EC2 instances |
| EFS | File storage | Shared files across multiple instances |
Database
| Service | What It Does | When to Use |
|---|---|---|
| RDS | Managed relational DBs | PostgreSQL, MySQL, etc. |
| DynamoDB | NoSQL database | Key-value, high scale |
| ElastiCache | In-memory caching | Redis, Memcached |
Networking
| Service | What It Does | When to Use |
|---|---|---|
| VPC | Virtual private network | Isolate your resources |
| Route 53 | DNS service | Domain names |
| CloudFront | CDN | Fast global content delivery |
| ALB/ELB | Load balancing | Distribute traffic |
Container Services
| Service | What It Does | When to Use |
|---|---|---|
| ECR | Container registry | Store Docker images |
| ECS | Container orchestration | Run and manage containers |
| EKS | Managed Kubernetes | K8s-based deployments |
IAM: The Permission System
IAM (Identity and Access Management) controls who can do what to which resources.
Key Concepts
IAM Hierarchy
├── Users (people)
├── Groups (collections of users)
├── Roles (temporary permissions for services)
└── Policies (permission documents)
Users vs Roles
| Type | For | Example |
|---|---|---|
| User | Humans | You logging into the console |
| Role | Services/Applications | EC2 instance accessing S3 |
Understanding Policies
Policies are JSON documents that define permissions:
json{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-bucket/*" } ] }
This policy says: "Allow reading objects from my-bucket"
Common Built-in Policies
| Policy | What It Allows |
|---|---|
AdministratorAccess | Everything (use carefully!) |
PowerUserAccess | Everything except IAM |
ReadOnlyAccess | View everything, change nothing |
AmazonS3FullAccess | Full S3 access |
AmazonEC2FullAccess | Full EC2 access |
Note
Principle of least privilege: Only grant the permissions actually needed. Start restrictive and add permissions as required.
ARNs: How AWS Identifies Resources
Every AWS resource has an ARN (Amazon Resource Name) - a unique identifier.
arn:aws:service:region:account:resource
Examples:
arn:aws:s3:::my-bucket # S3 bucket (global, no region)
arn:aws:ec2:us-east-1:123456789:instance/i-1234567890abcdef0
arn:aws:iam::123456789:user/admin # IAM user (global, no region)
You'll see ARNs in error messages, policies, and CLI output. They're how you precisely identify what you're working with.
Security Groups: The Firewall
Security groups control what network traffic can reach your resources.
Security Group: web-server
┌──────────────────────────────────────┐
│ Inbound Rules │
├──────────────────────────────────────┤
│ Port 80 (HTTP) ← From: 0.0.0.0/0 │ (anyone)
│ Port 443 (HTTPS) ← From: 0.0.0.0/0 │ (anyone)
│ Port 22 (SSH) ← From: 1.2.3.4/32 │ (your IP only)
└──────────────────────────────────────┘
┌──────────────────────────────────────┐
│ Outbound Rules │
├──────────────────────────────────────┤
│ All traffic → To: 0.0.0.0/0 │ (anywhere)
└──────────────────────────────────────┘
Note
Never open SSH (port 22) to 0.0.0.0/0 (everyone). Restrict it to your IP address or use AWS Systems Manager Session Manager instead.
VPC: Your Private Network
A VPC (Virtual Private Cloud) is your isolated network within AWS.
VPC: 10.0.0.0/16
├── Public Subnet: 10.0.1.0/24 (has internet access)
│ ├── Web Server (public IP)
│ └── NAT Gateway
│
└── Private Subnet: 10.0.2.0/24 (no direct internet)
├── Database (no public IP)
└── App Server (no public IP)
Default VPC
AWS creates a default VPC in each region. For learning, this is fine. For production, create custom VPCs with proper subnet design.
How Services Connect
Here's how a typical web application flows through AWS services:
User Request Flow
─────────────────
Internet
│
▼
Route 53 (DNS: myapp.com → IP address)
│
▼
CloudFront (CDN - caches static content)
│
▼
Application Load Balancer (distributes traffic)
│
├──────────────┬──────────────┐
▼ ▼ ▼
ECS Task 1 ECS Task 2 ECS Task 3
(Container) (Container) (Container)
│ │ │
└──────────────┴──────────────┘
│
▼
RDS Database
(PostgreSQL)
Cost Model: How You're Charged
AWS charges for what you use. Key pricing models:
| Model | How It Works | Example |
|---|---|---|
| On-Demand | Pay per hour/second | EC2 instances |
| Per Request | Pay per API call | Lambda, API Gateway |
| Storage | Pay per GB/month | S3, EBS |
| Data Transfer | Pay for outbound data | All services |
Note
Data transfer costs sneak up on you! Transferring data out of AWS costs money. Transferring between regions costs money. Transferring within the same AZ is free.
Free Tier Highlights
| Service | Free Tier (12 months) |
|---|---|
| EC2 | 750 hours/month t2.micro |
| S3 | 5 GB storage |
| RDS | 750 hours/month db.t2.micro |
| Lambda | 1 million requests/month (always free) |
Deployment Options Compared
Now that you understand the pieces, here's how they fit together for deployment:
| Path | Services Used | Complexity | Best For |
|---|---|---|---|
| Simple | App Runner + ECR | Low | Quick deployments |
| Standard | ECS Fargate + ECR + ALB | Medium | Production apps |
| Full Control | EC2 + Docker + nginx | High | Custom requirements |
Quick Reference: AWS CLI for Exploration
bash# Explore regions aws ec2 describe-regions --query 'Regions[].RegionName' --output table # List availability zones in your region aws ec2 describe-availability-zones --query 'AvailabilityZones[].ZoneName' # See your VPCs aws ec2 describe-vpcs --query 'Vpcs[].{ID:VpcId,CIDR:CidrBlock,Default:IsDefault}' # List security groups aws ec2 describe-security-groups --query 'SecurityGroups[].{Name:GroupName,ID:GroupId}' # Check your IAM user aws iam get-user
What's Next?
You now have a mental map of AWS. In the next lesson, we'll use App Runner to deploy your first container - the fastest path from code to running application.
Note
Checkpoint: You should be able to explain what a region is, why IAM matters, and name 3 compute services. If not, re-read the relevant sections.