AWS Architecture Reference
Comprehensive guide for AWS services, patterns, and Well-Architected Framework implementation.
Well-Architected Framework
Six Pillars
Operational Excellence
- Infrastructure as Code (CloudFormation, CDK, Terraform)
- Continuous integration/deployment
- Observability (CloudWatch, X-Ray)
- Runbooks and playbooks
- Game days and failure injection
Security
- Identity and Access Management (IAM)
- Detective controls (GuardDuty, Security Hub)
- Infrastructure protection (VPC, security groups, NACLs)
- Data protection (KMS, encryption at rest/transit)
- Incident response automation
Reliability
- Multi-AZ deployments
- Auto Scaling groups
- Route 53 health checks and failover
- Backup and restore (AWS Backup)
- Chaos engineering (AWS FIS)
Performance Efficiency
- Right-sizing with Compute Optimizer
- Caching strategies (CloudFront, ElastiCache)
- Database optimization (RDS Performance Insights)
- Serverless architectures
- Global content delivery
Cost Optimization
- Reserved Instances and Savings Plans
- Spot Instances for fault-tolerant workloads
- S3 Intelligent-Tiering and lifecycle policies
- Right-sizing recommendations
- Cost allocation tags and budgets
Sustainability
- Region selection for renewable energy
- Serverless to minimize idle resources
- Efficient data storage patterns
- Resource utilization optimization
Core Services Architecture
Compute
EC2 (Elastic Compute Cloud)
- Instance families: General (t3, m5), Compute (c5), Memory (r5), GPU (p3, g4)
- Auto Scaling: Target tracking, step scaling, scheduled scaling
- Placement groups: Cluster, partition, spread
- Best practices: Use latest generation, right-size, enable detailed monitoring
Lambda
- Invocation models: Synchronous, asynchronous, event source mapping
- Concurrency: Reserved, provisioned, burst limits
- Layers for shared dependencies
- Best practices: Keep functions small, use environment variables, set timeouts
ECS/EKS (Container Services)
- ECS: Fargate for serverless, EC2 for control
- EKS: Managed Kubernetes with AWS integration
- Service mesh: App Mesh for observability
- Best practices: Use Fargate for simplicity, EKS for portability
Elastic Beanstalk
- Managed platform for web apps
- Auto-scaling and load balancing included
- Support for multiple languages and Docker
Storage
S3 (Simple Storage Service)
- Storage classes: Standard, IA, One Zone-IA, Glacier, Deep Archive
- Lifecycle policies for automatic tiering
- Versioning and MFA delete for protection
- Cross-region replication for DR
- Best practices: Enable versioning, use lifecycle policies, block public access
EBS (Elastic Block Store)
- Volume types: gp3 (general), io2 (IOPS), st1 (throughput), sc1 (cold)
- Snapshots to S3 for backup
- Encryption by default
- Best practices: Use gp3 for most workloads, enable encryption
EFS (Elastic File System)
- NFSv4 file system for shared access
- Performance modes: General purpose, Max I/O
- Throughput modes: Bursting, provisioned
- Best practices: Use lifecycle management, enable encryption
FSx
- FSx for Windows File Server (SMB)
- FSx for Lustre (HPC workloads)
- FSx for NetApp ONTAP
- FSx for OpenZFS
Database
RDS (Relational Database Service)
- Engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Aurora
- Multi-AZ for high availability
- Read replicas for scalability
- Automated backups and point-in-time recovery
- Best practices: Use Aurora for performance, enable Multi-AZ, use read replicas
Aurora
- MySQL and PostgreSQL compatible
- 5x MySQL, 3x PostgreSQL performance
- Global databases for cross-region DR
- Serverless v2 for variable workloads
- Best practices: Use Aurora Serverless for unpredictable workloads
DynamoDB
- NoSQL key-value and document database
- On-demand or provisioned capacity
- Global tables for multi-region replication
- DynamoDB Streams for change data capture
- Best practices: Use on-demand for unpredictable traffic, implement GSI carefully
ElastiCache
- Redis or Memcached in-memory caching
- Cluster mode for Redis scalability
- Best practices: Use for session storage, API caching
Networking
VPC (Virtual Private Cloud)
- CIDR planning: Avoid overlaps, plan for growth
- Subnets: Public (IGW), private (NAT), isolated (no internet)
- Route tables and routing decisions
- Security groups (stateful) and NACLs (stateless)
- Best practices: Use /16 for VPC, /24 for subnets, plan IP space
Route 53
- DNS service with health checks
- Routing policies: Simple, weighted, latency, failover, geolocation
- Best practices: Use alias records, enable DNSSEC
CloudFront
- Global CDN with edge locations
- Origin types: S3, ALB, custom origins
- Lambda@Edge for request/response manipulation
- Best practices: Enable compression, use field-level encryption
VPN and Direct Connect
- Site-to-Site VPN for encrypted tunnels
- Direct Connect for dedicated bandwidth
- Transit Gateway for hub-and-spoke topology
- Best practices: Use Direct Connect for high bandwidth, Transit Gateway for complex routing
API Gateway
- REST APIs, HTTP APIs, WebSocket APIs
- Throttling and quotas
- Integration with Lambda, HTTP endpoints, AWS services
- Best practices: Use HTTP APIs for lower cost, implement caching
Security
IAM (Identity and Access Management)
- Principle of least privilege
- Roles for applications, not access keys
- MFA for privileged users
- Service Control Policies (SCPs) for organization-wide controls
- Best practices: Use roles, enable MFA, rotate credentials
KMS (Key Management Service)
- Customer managed keys (CMKs)
- Automatic key rotation
- Envelope encryption pattern
- Best practices: Enable automatic rotation, use grants for temporary access
Secrets Manager
- Automatic rotation for RDS credentials
- Versioning and rollback
- Best practices: Rotate secrets regularly, use VPC endpoints
Security Hub
- Centralized security findings
- CIS AWS Foundations Benchmark
- Integration with GuardDuty, Inspector, Macie
GuardDuty
- Threat detection using ML
- Monitors CloudTrail, VPC Flow Logs, DNS logs
Architecture Patterns
High Availability
Multi-AZ Pattern
- Application Load Balancer across 3 AZs
- Auto Scaling group with instances in each AZ
- RDS Multi-AZ for database
- S3 for static assets (11 9's durability)
Multi-Region Pattern
- Route 53 with health checks and failover
- CloudFront for global distribution
- Aurora Global Database for <1s RPO
- S3 Cross-Region Replication
Serverless Architecture
API-Driven Pattern
API Gateway -> Lambda -> DynamoDB
|
v
EventBridge -> Lambda (async processing)
Event-Driven Pattern
S3 Event -> Lambda -> Process -> SNS
|
v
Multiple subscribers
Microservices on AWS
Container-Based
ALB -> ECS Fargate (multiple services)
|
v
Service Discovery (Cloud Map)
|
v
RDS/DynamoDB per service
Service Mesh
App Mesh for traffic management
X-Ray for distributed tracing
CloudWatch Container Insights
Data Lake Architecture
Data Sources -> Kinesis Data Streams
|
v
Kinesis Firehose
|
v
S3 (raw bucket)
|
v
Glue ETL or Lambda processing
|
v
S3 (processed bucket)
|
v
Athena/Redshift Spectrum
|
v
QuickSight dashboards
Migration Strategies (6Rs)
Rehost (Lift-and-Shift)
- AWS Application Migration Service (MGN)
- Minimal changes, quick migration
- Use for legacy apps with compliance constraints
Replatform (Lift-Tinker-and-Shift)
- Migrate to RDS instead of self-managed databases
- Use Elastic Beanstalk instead of custom app servers
- Small optimizations during migration
Repurchase (Drop-and-Shop)
- Move to SaaS (e.g., Salesforce, Workday)
- Reduce maintenance burden
Refactor/Re-architect
- Modernize to serverless or containers
- Highest effort, highest benefit
- Use for competitive advantage applications
Retire
- Decommission unused applications
- Reduce attack surface and costs
Retain
- Keep on-premises temporarily
- Migrate later or keep for regulatory reasons
Landing Zone Design
AWS Control Tower
- Multi-account strategy (AWS Organizations)
- Account factory for standardization
- Guardrails for governance (SCPs)
- Centralized logging (CloudTrail, Config)
Account Structure
Root
├── Security OU
│ ├── Log Archive Account
│ └── Security Tooling Account
├── Infrastructure OU
│ ├── Network Account (Transit Gateway, VPN)
│ └── Shared Services Account
└── Workloads OU
├── Production Account
├── Staging Account
└── Development Account
Network Design
Transit Gateway (hub)
|
├── Production VPC
├── Staging VPC
├── Development VPC
└── On-premises (Direct Connect/VPN)
Cost Optimization Strategies
Compute Savings
- Compute Savings Plans (up to 66% savings)
- EC2 Reserved Instances (1-year or 3-year)
- Spot Instances for batch/fault-tolerant workloads
- Lambda: Reduce memory if possible, use reserved concurrency
Storage Savings
- S3 Intelligent-Tiering for unpredictable access
- Lifecycle policies to Glacier/Deep Archive
- EBS gp3 instead of gp2 (20% cheaper, better performance)
- Delete unused snapshots and volumes
Database Savings
- Aurora Serverless v2 for variable workloads
- RDS Reserved Instances
- DynamoDB on-demand for unpredictable workloads
- Read replicas in same region to reduce cross-AZ data transfer
Monitoring and Alerting
- AWS Cost Explorer for analysis
- AWS Budgets for alerts
- Cost Anomaly Detection
- Trusted Advisor for recommendations
Disaster Recovery
RPO and RTO Targets
- Backup and Restore: Hours RPO/RTO (lowest cost)
- Pilot Light: Minutes RPO, hours RTO
- Warm Standby: Seconds RPO, minutes RTO
- Multi-Site Active/Active: Near-zero RPO/RTO (highest cost)
Implementation
- AWS Backup for centralized backup management
- Aurora Global Database for cross-region replication
- S3 Cross-Region Replication
- Route 53 health checks and failover routing
- Regular DR testing with CloudFormation/Terraform
Monitoring and Observability
CloudWatch
- Metrics: Standard (5 min) and detailed (1 min)
- Alarms with SNS notifications
- Logs Insights for log analysis
- Dashboards for visualization
X-Ray
- Distributed tracing for microservices
- Service map visualization
- Trace annotations and metadata
AWS Config
- Resource inventory and change tracking
- Compliance rules evaluation
- Relationship tracking between resources
1---2name: aws-architecture-reference3description: Comprehensive guide for AWS services, patterns, and Well-Architected Framework implementation.4metadata:5 source: https://skillmd.com/skills/tools-only/aws-architecture-reference6---7# AWS Architecture Reference89Comprehensive guide for AWS services, patterns, and Well-Architected Framework implementation.1011## Well-Architected Framework1213### Six Pillars14151. **Operational Excellence**16 - Infrastructure as Code (CloudFormation, CDK, Terraform)17 - Continuous integration/deployment18 - Observability (CloudWatch, X-Ray)19 - Runbooks and playbooks20 - Game days and failure injection21222. **Security**23 - Identity and Access Management (IAM)24 - Detective controls (GuardDuty, Security Hub)25 - Infrastructure protection (VPC, security groups, NACLs)26 - Data protection (KMS, encryption at rest/transit)27 - Incident response automation28293. **Reliability**30 - Multi-AZ deployments31 - Auto Scaling groups32 - Route 53 health checks and failover33 - Backup and restore (AWS Backup)34 - Chaos engineering (AWS FIS)35364. **Performance Efficiency**37 - Right-sizing with Compute Optimizer38 - Caching strategies (CloudFront, ElastiCache)39 - Database optimization (RDS Performance Insights)40 - Serverless architectures41 - Global content delivery42435. **Cost Optimization**44 - Reserved Instances and Savings Plans45 - Spot Instances for fault-tolerant workloads46 - S3 Intelligent-Tiering and lifecycle policies47 - Right-sizing recommendations48 - Cost allocation tags and budgets49506. **Sustainability**51 - Region selection for renewable energy52 - Serverless to minimize idle resources53 - Efficient data storage patterns54 - Resource utilization optimization5556## Core Services Architecture5758### Compute5960**EC2 (Elastic Compute Cloud)**61- Instance families: General (t3, m5), Compute (c5), Memory (r5), GPU (p3, g4)62- Auto Scaling: Target tracking, step scaling, scheduled scaling63- Placement groups: Cluster, partition, spread64- Best practices: Use latest generation, right-size, enable detailed monitoring6566**Lambda**67- Invocation models: Synchronous, asynchronous, event source mapping68- Concurrency: Reserved, provisioned, burst limits69- Layers for shared dependencies70- Best practices: Keep functions small, use environment variables, set timeouts7172**ECS/EKS (Container Services)**73- ECS: Fargate for serverless, EC2 for control74- EKS: Managed Kubernetes with AWS integration75- Service mesh: App Mesh for observability76- Best practices: Use Fargate for simplicity, EKS for portability7778**Elastic Beanstalk**79- Managed platform for web apps80- Auto-scaling and load balancing included81- Support for multiple languages and Docker8283### Storage8485**S3 (Simple Storage Service)**86- Storage classes: Standard, IA, One Zone-IA, Glacier, Deep Archive87- Lifecycle policies for automatic tiering88- Versioning and MFA delete for protection89- Cross-region replication for DR90- Best practices: Enable versioning, use lifecycle policies, block public access9192**EBS (Elastic Block Store)**93- Volume types: gp3 (general), io2 (IOPS), st1 (throughput), sc1 (cold)94- Snapshots to S3 for backup95- Encryption by default96- Best practices: Use gp3 for most workloads, enable encryption9798**EFS (Elastic File System)**99- NFSv4 file system for shared access100- Performance modes: General purpose, Max I/O101- Throughput modes: Bursting, provisioned102- Best practices: Use lifecycle management, enable encryption103104**FSx**105- FSx for Windows File Server (SMB)106- FSx for Lustre (HPC workloads)107- FSx for NetApp ONTAP108- FSx for OpenZFS109110### Database111112**RDS (Relational Database Service)**113- Engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Aurora114- Multi-AZ for high availability115- Read replicas for scalability116- Automated backups and point-in-time recovery117- Best practices: Use Aurora for performance, enable Multi-AZ, use read replicas118119**Aurora**120- MySQL and PostgreSQL compatible121- 5x MySQL, 3x PostgreSQL performance122- Global databases for cross-region DR123- Serverless v2 for variable workloads124- Best practices: Use Aurora Serverless for unpredictable workloads125126**DynamoDB**127- NoSQL key-value and document database128- On-demand or provisioned capacity129- Global tables for multi-region replication130- DynamoDB Streams for change data capture131- Best practices: Use on-demand for unpredictable traffic, implement GSI carefully132133**ElastiCache**134- Redis or Memcached in-memory caching135- Cluster mode for Redis scalability136- Best practices: Use for session storage, API caching137138### Networking139140**VPC (Virtual Private Cloud)**141- CIDR planning: Avoid overlaps, plan for growth142- Subnets: Public (IGW), private (NAT), isolated (no internet)143- Route tables and routing decisions144- Security groups (stateful) and NACLs (stateless)145- Best practices: Use /16 for VPC, /24 for subnets, plan IP space146147**Route 53**148- DNS service with health checks149- Routing policies: Simple, weighted, latency, failover, geolocation150- Best practices: Use alias records, enable DNSSEC151152**CloudFront**153- Global CDN with edge locations154- Origin types: S3, ALB, custom origins155- Lambda@Edge for request/response manipulation156- Best practices: Enable compression, use field-level encryption157158**VPN and Direct Connect**159- Site-to-Site VPN for encrypted tunnels160- Direct Connect for dedicated bandwidth161- Transit Gateway for hub-and-spoke topology162- Best practices: Use Direct Connect for high bandwidth, Transit Gateway for complex routing163164**API Gateway**165- REST APIs, HTTP APIs, WebSocket APIs166- Throttling and quotas167- Integration with Lambda, HTTP endpoints, AWS services168- Best practices: Use HTTP APIs for lower cost, implement caching169170### Security171172**IAM (Identity and Access Management)**173- Principle of least privilege174- Roles for applications, not access keys175- MFA for privileged users176- Service Control Policies (SCPs) for organization-wide controls177- Best practices: Use roles, enable MFA, rotate credentials178179**KMS (Key Management Service)**180- Customer managed keys (CMKs)181- Automatic key rotation182- Envelope encryption pattern183- Best practices: Enable automatic rotation, use grants for temporary access184185**Secrets Manager**186- Automatic rotation for RDS credentials187- Versioning and rollback188- Best practices: Rotate secrets regularly, use VPC endpoints189190**Security Hub**191- Centralized security findings192- CIS AWS Foundations Benchmark193- Integration with GuardDuty, Inspector, Macie194195**GuardDuty**196- Threat detection using ML197- Monitors CloudTrail, VPC Flow Logs, DNS logs198199## Architecture Patterns200201### High Availability202203**Multi-AZ Pattern**204```205- Application Load Balancer across 3 AZs206- Auto Scaling group with instances in each AZ207- RDS Multi-AZ for database208- S3 for static assets (11 9's durability)209```210211**Multi-Region Pattern**212```213- Route 53 with health checks and failover214- CloudFront for global distribution215- Aurora Global Database for <1s RPO216- S3 Cross-Region Replication217```218219### Serverless Architecture220221**API-Driven Pattern**222```223API Gateway -> Lambda -> DynamoDB224 |225 v226 EventBridge -> Lambda (async processing)227```228229**Event-Driven Pattern**230```231S3 Event -> Lambda -> Process -> SNS232 |233 v234 Multiple subscribers235```236237### Microservices on AWS238239**Container-Based**240```241ALB -> ECS Fargate (multiple services)242 |243 v244Service Discovery (Cloud Map)245 |246 v247RDS/DynamoDB per service248```249250**Service Mesh**251```252App Mesh for traffic management253X-Ray for distributed tracing254CloudWatch Container Insights255```256257### Data Lake Architecture258259```260Data Sources -> Kinesis Data Streams261 |262 v263 Kinesis Firehose264 |265 v266 S3 (raw bucket)267 |268 v269 Glue ETL or Lambda processing270 |271 v272 S3 (processed bucket)273 |274 v275 Athena/Redshift Spectrum276 |277 v278 QuickSight dashboards279```280281## Migration Strategies (6Rs)2822831. **Rehost (Lift-and-Shift)**284 - AWS Application Migration Service (MGN)285 - Minimal changes, quick migration286 - Use for legacy apps with compliance constraints2872882. **Replatform (Lift-Tinker-and-Shift)**289 - Migrate to RDS instead of self-managed databases290 - Use Elastic Beanstalk instead of custom app servers291 - Small optimizations during migration2922933. **Repurchase (Drop-and-Shop)**294 - Move to SaaS (e.g., Salesforce, Workday)295 - Reduce maintenance burden2962974. **Refactor/Re-architect**298 - Modernize to serverless or containers299 - Highest effort, highest benefit300 - Use for competitive advantage applications3013025. **Retire**303 - Decommission unused applications304 - Reduce attack surface and costs3053066. **Retain**307 - Keep on-premises temporarily308 - Migrate later or keep for regulatory reasons309310## Landing Zone Design311312**AWS Control Tower**313- Multi-account strategy (AWS Organizations)314- Account factory for standardization315- Guardrails for governance (SCPs)316- Centralized logging (CloudTrail, Config)317318**Account Structure**319```320Root321├── Security OU322│ ├── Log Archive Account323│ └── Security Tooling Account324├── Infrastructure OU325│ ├── Network Account (Transit Gateway, VPN)326│ └── Shared Services Account327└── Workloads OU328 ├── Production Account329 ├── Staging Account330 └── Development Account331```332333**Network Design**334```335Transit Gateway (hub)336 |337 ├── Production VPC338 ├── Staging VPC339 ├── Development VPC340 └── On-premises (Direct Connect/VPN)341```342343## Cost Optimization Strategies344345**Compute Savings**346- Compute Savings Plans (up to 66% savings)347- EC2 Reserved Instances (1-year or 3-year)348- Spot Instances for batch/fault-tolerant workloads349- Lambda: Reduce memory if possible, use reserved concurrency350351**Storage Savings**352- S3 Intelligent-Tiering for unpredictable access353- Lifecycle policies to Glacier/Deep Archive354- EBS gp3 instead of gp2 (20% cheaper, better performance)355- Delete unused snapshots and volumes356357**Database Savings**358- Aurora Serverless v2 for variable workloads359- RDS Reserved Instances360- DynamoDB on-demand for unpredictable workloads361- Read replicas in same region to reduce cross-AZ data transfer362363**Monitoring and Alerting**364- AWS Cost Explorer for analysis365- AWS Budgets for alerts366- Cost Anomaly Detection367- Trusted Advisor for recommendations368369## Disaster Recovery370371**RPO and RTO Targets**372- Backup and Restore: Hours RPO/RTO (lowest cost)373- Pilot Light: Minutes RPO, hours RTO374- Warm Standby: Seconds RPO, minutes RTO375- Multi-Site Active/Active: Near-zero RPO/RTO (highest cost)376377**Implementation**378- AWS Backup for centralized backup management379- Aurora Global Database for cross-region replication380- S3 Cross-Region Replication381- Route 53 health checks and failover routing382- Regular DR testing with CloudFormation/Terraform383384## Monitoring and Observability385386**CloudWatch**387- Metrics: Standard (5 min) and detailed (1 min)388- Alarms with SNS notifications389- Logs Insights for log analysis390- Dashboards for visualization391392**X-Ray**393- Distributed tracing for microservices394- Service map visualization395- Trace annotations and metadata396397**AWS Config**398- Resource inventory and change tracking399- Compliance rules evaluation400- Relationship tracking between resources