AWS in Production
About This Book
Dedication
About the Author
Acknowledgements
Introduction
- Why I Wrote This Book
- Who This Book Is For
- What This Book Covers
- The Project Thread
- Tools You Will Need
- A Note on Cost
- On Code Examples
- One Thing Before You Start
- Part 1: Core Serverless
Route 53 — DNS & Routing Basics
- What You’ll Learn
- Prerequisites
- Why Start Here
- How DNS Works
- Concepts
- Hands-On: Point a Custom Domain at an S3 Static Website
- Production Patterns
- Key Takeaways
- What’s Next
Lambda — Functions & Execution Model
- What You’ll Learn
- Prerequisites
- Why Lambda Changes the Architecture
- Concepts
- Hands-On: Deploy Your First Function
- Production Patterns
- Key Takeaways
- What’s Next
API Gateway — Building HTTP APIs
- What You’ll Learn
- Prerequisites
- Why API Gateway
- Concepts
- Hands-On: HTTP API with Lambda, Custom Domain, and CORS
- Production Patterns
- Key Takeaways
- What’s Next
CloudWatch Intro — Logs & Metrics
- What You’ll Learn
- Prerequisites
- Why Observability Comes Before More Features
- Concepts
- Hands-On: Error Rate Alarm with Email Notification
- Structured Logging Pattern
- Key Takeaways
- What’s Next
Step Functions — Orchestrating Workflows
- What You’ll Learn
- Prerequisites
- The Problem Step Functions Solves
- Concepts
- Hands-On: Order Processing Pipeline
- Key Takeaways
- What’s Next
Infrastructure as Code with Serverless Framework
- What You’ll Learn
- Prerequisites
- Why Infrastructure as Code
- Choosing Your Tool
- Installing Serverless Framework
- Concepts
- Hands-On: Deploy the Part 1 Project with Serverless Framework
- Key Takeaways
- Part 2: AWS Services
IAM — Identity & Access Management
- What You’ll Learn
- Prerequisites
- Why IAM Is the Most Important Service You’ll Ever Misconfigure
- Concepts
- Hands-On: Audit and Fix the Part 1 Roles
- Cross-Account Access
- Common IAM Anti-Patterns
- Key Takeaways
- What’s Next
ELB — Elastic Load Balancing
- What You’ll Learn
- Prerequisites
- Why a Load Balancer
- Concepts
- VPC Quick Start
- Hands-On: ALB in Front of a Lambda Function
- Production Patterns
- Key Takeaways
- What’s Next
S3 — Object Storage
- What You’ll Learn
- Prerequisites
- S3 Is Not a File System
- Concepts
- Hands-On: Upload Pipeline with Lambda Processing
- Key Takeaways
- What’s Next
SNS — Simple Notification Service
- What You’ll Learn
- Prerequisites
- The Pub/Sub Mental Model
- Concepts
- Hands-On: Add Fan-Out to the Order Pipeline
- Production Patterns
- Key Takeaways
- What’s Next
SQS — Simple Queue Service
- What You’ll Learn
- Prerequisites
- Why a Queue
- Concepts
- Hands-On: Async Job Queue for Image Processing
- Key Takeaways
- What’s Next
DynamoDB — NoSQL at Scale
- What You’ll Learn
- Prerequisites
- DynamoDB Is Not a Relational Database
- Concepts
- Single-Table Design
- Hands-On: Order Store with Single-Table Design
- Key Takeaways
- What’s Next
- Part 3: Security & Auth
JWT — Token-Based Authentication
- What You’ll Learn
- Prerequisites
- The Authentication Problem
- Concepts
- Hands-On: Protect the Order API with Cognito
- Common Mistakes
- Key Takeaways
- What’s Next
Secret Management — SSM Parameter Store & Secrets Manager
- What You’ll Learn
- Prerequisites
- The Credential Anti-Pattern
- Concepts
- Hands-On: Migrate Hardcoded Config to SSM
- Production Patterns
- Key Takeaways
- What’s Next
API Keys Transport — KMS & Secure Key Distribution
- What You’ll Learn
- Prerequisites
- Two Different Problems
- Concepts
- Secure API Key Vending
- Audit Trail
- Key Takeaways
- Part 4: Containers
ECR — Elastic Container Registry
- What You’ll Learn
- Prerequisites
- Why a Private Registry
- Concepts
- Hands-On: Push Your First Application Image to ECR
- Production Patterns
- Key Takeaways
- What’s Next
Docker on AWS
- What You’ll Learn
- Prerequisites
- The Cost of a Naive Dockerfile
- Concepts
- Hands-On: Production Dockerfile for the API Service
- Key Takeaways
- What’s Next
ECS — Container Orchestration
- What You’ll Learn
- Prerequisites
- From Lambda to Containers
- Concepts
- Hands-On: Deploy the API Service to ECS Fargate
- Production Patterns
- Key Takeaways
- Part 5: Advanced
Advanced CloudWatch — Dashboards, Alarms & Insights
- What You’ll Learn
- Prerequisites
- The Difference Between Monitoring and Observability
- Concepts
- Hands-On: Production Operations Dashboard
- Production Patterns
- Key Takeaways
- What’s Next
Step Functions Advanced — Complex State Machines
- What You’ll Learn
- Prerequisites
- Where Step Functions Earns Its Place
- Concepts
- Hands-On: High-Value Order Approval Workflow
- Production Patterns
- Key Takeaways
CI/CD — Deploying to AWS from GitHub Actions
- What You’ll Learn
- Prerequisites
- Why Automate Deployments
- Concepts
- Hands-On: Complete CI/CD Pipeline
- Production Patterns
- Key Takeaways
- What’s Next
Appendix A — Complete System Architecture
- The Order Processing Platform
- Architecture Diagram
- Service-to-Chapter Map
- Request Flow: POST /orders (happy path)
- Request Flow: POST /orders with amount > €500 (approval path)
- Data Model: DynamoDB Single-Table (AppData)
- IAM Role Map
Appendix B — Code Reference
- Project Structure
- Lambda Bootstrap Pattern
- Config Loading from SSM (Chapter 14)
- DynamoDB Single-Table Helpers (Chapter 12)
- SQS Consumer with ReportBatchItemFailures (Chapter 11)
- API Key Validation (Chapter 15)
- Embedded Metric Format (Chapter 19)
- Health Check Handler (Chapter 17)
- Dockerfile (Chapter 17)
- Makefile
- serverless.yml (Chapter 6)
- CloudWatch Logs Insights — Saved Queries
- AWS CLI Quick Reference
Appendix C — Cost & Limits Reference
- Free Tier Summary (per month, perpetual unless noted)
- Cost Estimates for This Book’s Architecture
- Service Limits (Soft = Adjustable, Hard = Fixed)
- When to Request a Limit Increase
- Cost Anomaly Detection
Appendix D — VPC in 10 Minutes
- The Default VPC
- The Three Building Blocks
- Security Groups vs Network ACLs
- VPC Endpoints
- Key Takeaways