AWS Reference Architecture & System Design Mastery Guide
The ultimate reference manual mapping distributed primitives to AWS cloud native offerings. Includes cross-region replication strategies, failover runbooks, messaging decision matrices, interactive service directory, and cost guardrails.
Interactive AWS Service Catalog & Architecture Explorer
Direct deep dives, latency SLAs, replication topologies, and cross-curriculum blueprint mapping for 18 AWS managed services.
Amazon ElastiCache
In-Memory CachingManaged Redis OSS & Memcached in-memory caching engine engineered for ultra-low-latency session stores, distributed locks, real-time gaming leaderboards, and database read offloading.
Key Architectural Patterns & Primitives
Redis Cluster Mode Enabled (up to 500 shards, 310 TB RAM) with Multi-AZ automatic failover (< 30s) and Global Datastore cross-region replication (< 1s lag).
- Reserve 25% memory (reserved-memory-percent = 25) for Redis snapshotting/BGSAVE to prevent Out-Of-Memory crashes.
- Configure volatile-lru or allkeys-lru eviction policies based on whether all keys have explicit TTLs.
- Use client-side connection pooling to prevent TCP handshake exhaustion during traffic spikes.
Amazon DynamoDB
DatabaseFully managed distributed NoSQL key-value and document database offering consistent single-digit millisecond latency at any scale, Single-Table design, and multi-region active-active replication.
Key Architectural Patterns & Primitives
Automatic 3-AZ synchronous Paxos quorum per partition; asynchronous Global Tables replication across AWS regions (< 1s lag).
- Avoid monotonically increasing partition keys (e.g. timestamps) that create hot partition bottlenecks (1,000 WCU / 3,000 RCU limit per partition). Use key salting (pk#0..9).
- Avoid high-selectivity FilterExpression queries; they read entire partitions before filtering. Structure PK/SK or use GSIs instead.
- Leverage TTL for automated background record expiration with zero WCU consumption.
Amazon Aurora
DatabaseHigh-performance distributed relational database engine (MySQL/PostgreSQL compatible) with separated compute and log-structured storage tiers, Aurora Serverless v2, and Global Databases.
Key Architectural Patterns & Primitives
Quorum-based 4/6 write quorum and 3/6 read quorum across 3 AZs; asynchronous storage replication across regions.
- Always deploy Amazon RDS Proxy in front of Aurora when using serverless compute (AWS Lambda) to multiplex and pool database connections.
- Route heavy analytical SQL queries to dedicated Reader Endpoints to protect Writer buffer pool memory.
- Set failover priority tiers (tier-0, tier-1) on read replicas for deterministic Multi-AZ failover target promotion.
Amazon S3
StorageExabyte-scale distributed object storage providing 11 9s durability, granular prefix partitioning, multipart chunked uploads, presigned URLs for direct client transfer, and automated lifecycle tiering.
Key Architectural Patterns & Primitives
Synchronous erasure coding across minimum 3 Availability Zones; asynchronous cross-region replication.
- Structure high-throughput object keys with hash prefixes (s3://bucket/data/<hash>/file) to scale across multiple S3 partition shards.
- Enable S3 Bucket Versioning and Object Lock with WORM (Write Once, Read Many) compliance for financial ledgers and compliance logs.
- Configure automated lifecycle expiration rules on multipart upload aborts (AbortIncompleteMultipartUpload) to eliminate orphaned storage costs.
Amazon SQS
Messaging & StreamingFully managed distributed message queuing service providing asynchronous decoupling, point-to-point worker dispatch, strict FIFO ordering with MessageGroupId, and Dead-Letter Queue (DLQ) containment.
Key Architectural Patterns & Primitives
Multi-AZ redundant message store with configurable message retention (1 minute to 14 days).
- Always configure Visibility Timeout greater than maximum worker processing duration (e.g. 6x Lambda timeout) to prevent duplicate concurrent executions.
- Set unique MessageDeduplicationId for SQS FIFO to ensure exactly-once deduplication across 5-minute rolling windows.
- Attach CloudWatch alarms on ApproximateNumberOfMessagesVisible to trigger horizontal Auto Scaling on consumer worker fleets.
Amazon SNS
Messaging & StreamingHigh-throughput Pub/Sub messaging service for 1-to-many multicast fanout to SQS queues, Lambda functions, HTTP webhooks, and mobile push notifications (APNs / FCM).
Key Architectural Patterns & Primitives
Multi-AZ topic replication with automatic subscriber retry and dead-letter queue routing on delivery failure.
- Combine SNS with SQS (SNS-to-SQS fanout) rather than calling HTTP endpoints directly to prevent slow subscriber backpressure from dropping events.
- Configure DLQs on individual SNS subscriptions to catch delivery failures to endpoints.
- Use SNS FIFO topics paired with SQS FIFO queues when strict global or group message ordering must be preserved across fanout.
Amazon Kinesis Data Streams
Messaging & StreamingReal-time streaming data ingestion platform designed for high-throughput partitioned log processing, financial ticker streams, ad-click tracking, and time-series telemetry.
Key Architectural Patterns & Primitives
Synchronous replication across 3 AZs; partition log replayable by independent consumer offsets.
- Avoid low-cardinality partition keys that overload a single shard (1,000 records/s or 1 MB/s write limit per shard).
- Use Kinesis Producer Library (KPL) with aggregation and collection to pack multiple user records into single 1MB chunks to maximize shard efficiency.
- Set Lambda Event Source Mapping BisectBatchOnFunctionError = true to isolate poison records without stalling entire shard consumers.
Amazon MSK
Messaging & StreamingFully managed Apache Kafka service providing high-throughput event streaming, native Kafka APIs, open-source ecosystem compatibility (Kafka Connect, Flink, Schema Registry), and multi-region replication.
Key Architectural Patterns & Primitives
Multi-AZ broker deployment with configurable min.insync.replicas and replication factor 3.
- Configure producer acks=all and enable idempotence (enable.idempotence=true) for zero message loss and duplicate prevention.
- Monitor Kafka consumer group lag (records-lag-max) with CloudWatch alarms to scale consumer workers proactively.
- Size partition counts based on expected peak consumer concurrency (partitions >= consumer tasks).
AWS Step Functions
Workflow & OrchestrationServerless visual workflow orchestrator built for distributed Saga transactions, long-running business processes, microservice coordination, automated retries, and compensation rollbacks.
Key Architectural Patterns & Primitives
Fully managed regional state machine execution with exactly-once state transition logging.
- Use Standard Workflows for financial/critical transactional sagas requiring visual step auditing; use Express Workflows for high-volume, short-duration data transformations.
- Ensure all compensation actions in Catch handlers are strictly idempotent to handle retry loops safely.
- Set explicit TimeoutSeconds on every task state to prevent stalled external API calls from blocking workflow completion.
Amazon OpenSearch Service
DatabaseDistributed Lucene-based search and analytics suite offering inverted index full-text search, Edge-NGram typeahead autocomplete, BM25 relevance ranking, and k-NN vector embeddings search.
Key Architectural Patterns & Primitives
Primary and replica shards distributed across up to 3 Availability Zones with dedicated master nodes.
- Set primary shard count at index creation based on target shard sizes of 30GB–50GB for search workloads (10GB–30GB for logs).
- Use OpenSearch Ingestion (OSI) or DynamoDB Streams with Lambda to decouple database writes from search indexing.
- Deploy 3 dedicated Cluster Manager nodes in production to prevent split-brain consensus failures.
Amazon API Gateway
Networking & EdgeServerless API ingress proxy managing REST, HTTP, and WebSocket APIs with built-in token-bucket rate limiting, JWT/Lambda authorizers, request validation, and WebSocket connection tracking.
Key Architectural Patterns & Primitives
Multi-AZ managed ingress with CloudFront integration for Edge-optimized distributions.
- Use HTTP APIs instead of REST APIs for lightweight, latency-critical REST endpoints to reduce latency by up to 60% and cost by 70%.
- Store WebSocket connection IDs ($context.connectionId) in DynamoDB with TTL to clean up disconnected sockets cleanly.
- Enable API Gateway caching or place CloudFront in front of REST APIs to offload repetitive GET requests.
Amazon CloudFront
Networking & EdgeGlobal Content Delivery Network (CDN) with 600+ Points of Presence providing low-latency static/dynamic content delivery, Origin Shield tiering, edge compute (CloudFront Functions), and DDoS shielding.
Key Architectural Patterns & Primitives
Globally distributed Anycast edge network with regional edge caches (REC).
- Configure Cache-Control headers (max-age, s-maxage, stale-while-revalidate) to maximize cache hit ratio (> 95%) and minimize egress bandwidth costs.
- Always forward only required query strings and headers in Cache Policies to avoid cache key fragmentation.
- Combine with AWS WAF attached directly at CloudFront edge to block malicious traffic before it reaches regional VPCs.
Amazon Route 53
Networking & EdgeHighly available authoritative DNS service providing latency-based routing, geolocation routing, synthetic health check failovers, and Application Recovery Controller (ARC) for multi-region disaster recovery.
Key Architectural Patterns & Primitives
Globally distributed Anycast DNS network with 100% availability service level agreement.
- Use Alias records instead of CNAME records for apex domains (example.com) to benefit from free Route 53 queries to AWS resources (CloudFront, ALBs).
- Set short TTLs (60s) on failover records to accelerate client DNS cache invalidation during disaster recovery events.
- Use Route 53 Resolver for hybrid cloud DNS resolution between on-premises datacenters and AWS VPCs.
AWS WAF & AWS Shield
Security & GovernanceLayer 7 web application firewall and DDoS protection protecting web applications against SQL injection, cross-site scripting (XSS), bot scrapers, and volumetric layer 3/4/7 DDoS attacks.
Key Architectural Patterns & Primitives
Integrated natively at CloudFront edge POPs, Application Load Balancers, and API Gateways.
- Deploy WAF in Count Mode first when introducing new rule sets to analyze false-positive rates before switching to Block.
- Use custom response bodies (HTTP 429 Too Many Requests with JSON payload) for cleaner API client error handling.
- Inspect customized headers (e.g. x-forwarded-for) with trusted proxy counts when WAF is deployed behind intermediate reverse proxies.
AWS Lambda
Compute & ContainersEvent-driven serverless compute engine running code in response to SQS queues, Kinesis streams, S3 uploads, and API Gateway requests with automatic horizontal scaling and zero idle cost.
Key Architectural Patterns & Primitives
Multi-AZ serverless execution fleet with automated container recycling.
- Initialize heavy clients (AWS SDKs, database pools) outside the event handler in global scope to reuse connections across warm invocations.
- Use AWS Graviton2/3 (arm64 architecture) for up to 34% better price-performance over x86.
- Configure Reserved Concurrency on critical functions to prevent unthrottled batch workers from exhausting account-wide concurrency limits.
Amazon ECS Fargate
Compute & ContainersServerless container management service running Docker microservice fleets without managing underlying EC2 server infrastructure, featuring native AWS VPC networking and target-tracking auto-scaling.
Key Architectural Patterns & Primitives
Multi-AZ task placement strategies with automatic unhealthy container replacement.
- Set proper container stop timeouts (stopTimeout = 30s) and deregistration delays on ALBs to ensure clean HTTP connection draining during deployments.
- Use AWS Secrets Manager integration in Task Definitions to inject secrets as environment variables securely at container startup.
- Utilize Fargate Spot for non-critical, fault-tolerant background worker fleets for up to 70% cost reduction.
Amazon MemoryDB for Redis
DatabaseDurable, in-memory database built for Redis OSS compatibility with an immutable Multi-AZ transaction log, delivering ultra-fast performance with zero data loss on node failovers.
Key Architectural Patterns & Primitives
Multi-AZ distributed write transaction log; writes committed to durable storage before acknowledgment.
- Use MemoryDB when you need Redis as your primary durable database; use ElastiCache when Redis is a transient cache in front of Aurora/DynamoDB.
- Account for slightly higher write latency (1-3ms) compared to ElastiCache due to Multi-AZ synchronous transaction log persistence.
- Cluster mode is always enabled in MemoryDB; ensure client libraries (ioredis, redis-py) have cluster support enabled.
AWS AppSync
Networking & EdgeFully managed GraphQL service and real-time WebSocket Pub/Sub engine with direct DynamoDB resolvers, offline delta synchronization, and automated conflict resolution for mobile clients.
Key Architectural Patterns & Primitives
Multi-AZ managed GraphQL infrastructure with WebSocket connection tiering.
- Use JavaScript (APPSYNC_JS) runtime resolvers instead of VTL (Velocity Template Language) for easier debugging and unit testing.
- Implement field-level authorization directives (@auth) with Amazon Cognito User Pools for fine-grained multi-tenant security.
- Configure caching on frequently queried GraphQL query fields to reduce backend DynamoDB read capacity consumption.
A comprehensive, production-grade guide to designing large-scale distributed systems using Amazon Web Services (AWS) as the primary cloud architecture standard. This guide maps core system design primitives, high-availability patterns, data storage engines, and messaging topologies directly to AWS managed services.
🏛️ Master System Design Primitive to AWS Service Matrix
| System Design Primitive | Primary AWS Managed Service | Secondary / Self-Managed Option | Production Architecture Pattern & Use Case |
|---|---|---|---|
| DNS & Traffic Routing | Amazon Route 53 | AWS Global Accelerator | Latency-based routing, Geo-DNS, Failover health checks, Anycast IP routing |
| Edge CDN & Caching | Amazon CloudFront | CloudFront Functions / Lambda@Edge | Static asset caching, dynamic edge compute, SSL termination, origin shield |
| DDoS & Web Security | AWS WAF & AWS Shield | AWS Network Firewall | Rate-limiting rules, SQLi/XSS filtering, Layer 3/4/7 DDoS protection |
| API Gateway & Ingress | Amazon API Gateway (REST / HTTP / WebSocket) | Application Load Balancer (ALB) / Network Load Balancer (NLB) | Edge authentication (Lambda Authorizers), rate-limiting usage plans, WebSocket connection management, gRPC pass-through |
| Serverless Compute | AWS Lambda | AWS Fargate | Event-driven microservices, asynchronous queue/stream consumers, scale-to-zero workloads |
| Container Compute | Amazon ECS / Amazon EKS | Amazon EC2 (Auto Scaling Groups) | Long-running microservices, high-throughput gRPC backends, distributed worker fleets |
| Distributed Key-Value Store | Amazon DynamoDB | Redis on Amazon EC2 | Single-digit millisecond NoSQL, Single-Table Design, Global Tables (multi-region active-active) |
| In-Memory Caching | Amazon ElastiCache (Redis / Memcached) | Amazon MemoryDB for Redis | Cache-Aside, Write-Through, Redis Sorted Sets (leaderboards), Redis Pub/Sub, multi-AZ failover |
| Relational OLTP Database | Amazon Aurora (PostgreSQL / MySQL) | Amazon RDS Multi-AZ | Cloud-native distributed storage engine (6-way replication across 3 AZs), Aurora Global Database, Aurora Serverless v2 |
| Object Storage & Data Lake | Amazon S3 (Standard / Glacier / Intelligent-Tiering) | S3 Express One Zone | 11 9s durability, multipart uploads, presigned URLs, cross-region replication (CRR), lifecycle policies |
| Point-to-Point Messaging | Amazon SQS (Standard & FIFO) | RabbitMQ on Amazon MQ | Asynchronous decoupling, message deduplication IDs, visibility timeouts, Dead-Letter Queues (DLQ) |
| Pub/Sub Notification | Amazon SNS | Amazon EventBridge | Topic-based multicast fanout to SQS queues, mobile push (APNs/FCM), SMS, and email (SES) |
| Distributed Event Streaming | Amazon Kinesis Data Streams | Amazon MSK (Managed Streaming for Kafka) | High-throughput ordered event ingestion, replayable partition logs, stream consumer groups |
| Event Bus & Choreography | Amazon EventBridge | Amazon SNS | Schema Registry, content-based rule filtering, SaaS integration, decoupling microservice events |
| Distributed Saga Orchestration | AWS Step Functions | Temporal on EKS | Visual workflow state machines, retry policies, catch handlers, compensation tasks for distributed rollbacks |
| Full-Text & Autocomplete Search | Amazon OpenSearch Service | Self-hosted Elasticsearch on EKS | Inverted indexes, prefix autocomplete (Edge-NGram / Completion Suggester), BM25 ranking, k-NN vector search |
| Geospatial Processing | Amazon Aurora PostGIS / Amazon Location Service | DynamoDB Geo Library | R-Tree / GiST indexing, ST_DWithin radius queries, routing engine APIs, geofencing |
| Change Data Capture (CDC) | DynamoDB Streams / AWS DMS | Debezium on Amazon MSK | Real-time database changelog capture, downstream cache invalidation, search index synchronization |
| Distributed Locking & Leases | DynamoDB Lock Client | Redis Redlock on ElastiCache | Heartbeated TTL leases, conditional writes (attribute_not_exists), optimistic concurrency control |
| Secrets & Encryption | AWS Secrets Manager & AWS KMS | AWS Systems Manager Parameter Store | Envelope encryption (CMK / DEK), automated secret rotation, hardware security modules (HSM) |
🏗️ Core Production Architecture Archetypes
Archetype 1: High-Throughput Read-Heavy Platform (e.g., News Feed, Catalogs)
Interactive Architecture DiagramSynthesizing vector architecture diagram...
Key Architectural Rules:
- Edge Offloading: Static images and pre-rendered payloads cached in CloudFront.
- Cache-Aside Pattern: Services query ElastiCache Redis first; on miss, read from Aurora Read Replicas and populate cache with TTL + jitter.
- Database Scaling: Read replicas auto-scale based on CPU / connection metrics.
Archetype 2: High-Throughput Write-Heavy Ingestion (e.g., Metrics, Ad Clicks, IoT)
Interactive Architecture DiagramSynthesizing vector architecture diagram...
Archetype 3: Mission-Critical Financial & Transactional (e.g., Payments, Wallets)
Interactive Architecture DiagramSynthesizing vector architecture diagram...
⚠️ AWS Cloud Anti-Patterns & Common Scalability Pitfalls
| AWS Service | Production Anti-Pattern / Mistake | Real-World Failure Impact | Production Best Practice & Solution |
|---|---|---|---|
| Amazon DynamoDB | Monotonically increasing partition keys (e.g., timestamp 2026-09-04 12:00:00) | Single partition throttles ( limit); remaining cluster sits idle | Apply Write Sharding / Key Salting (timestamp#0..9) |
| Amazon DynamoDB | Querying with high-selectivity FilterExpression | Reads entire table/partition before filtering, consuming immense RCU and timing out | Redesign PK / SK or create a Global Secondary Index (GSI) |
| Amazon S3 | Uploading millions of files under a single static prefix (s3://bucket/data/file1.jpg) | Hits S3 prefix throughput limit () | Distribute prefixes using hash suffixes (s3://bucket/data/<hash>/file1.jpg) |
| AWS Lambda | Opening new database connections inside handler without pooling | Exhausts relational database connection pools within seconds | Use Amazon RDS Proxy for connection multiplexing and pooling |
| Amazon SQS FIFO | Setting a single MessageGroupId for all messages | Serializes entire queue to a single consumer, capping throughput at 300 msg/s | Set granular MessageGroupId (e.g. user_id or order_id) |
| Amazon Aurora | Running long analytical batch queries directly on writer node | Squeezes buffer pool RAM, blocking transactional OLTP writes | Route analytical SQL to Aurora Read Replicas or S3 data lake via Athena |
💰 AWS Production Cost Optimization Playbook
- Graviton3 Compute: Migrate ECS Fargate, Lambda, and Aurora instances to AWS Graviton (ARM64) for better performance and lower cost.
- S3 Intelligent-Tiering: Automatically transition objects between Frequent, Infrequent, and Archive Instant Access tiers, saving up to on storage costs with zero operational overhead.
- DynamoDB On-Demand vs. Provisioned Auto-Scaling:
- Use On-Demand for unpredictable or bursty workloads.
- Use Provisioned Auto-Scaling with Reserved Capacity for steady-state workloads ( cost reduction).
- CloudFront Caching Optimization: Maximize cache hit ratios () to reduce expensive EC2/ALB data transfer egress fees.
🌍 Multi-Region High Availability & Zero-Downtime DR Runbook
Interactive Architecture DiagramSynthesizing vector architecture diagram...
Failover Execution Steps:
- Health Check Failure: Route 53 ARC detects regional outage in
us-east-1. - DNS Shift: Route 53 shifts 100% of ingress traffic to
us-west-2edge POPs. - Aurora Promotion: Execute Aurora Global Database failover (
aws rds failover-global-cluster) to promoteus-west-2read replica to primary writer in . - DynamoDB Continuity: DynamoDB Global Tables accept writes immediately in
us-west-2with zero manual failover steps.
⚡ AWS Managed Services Deep-Dive Reference
<a id="elasticache"></a> Amazon ElastiCache (Redis OSS & Memcached)
- Primary Category: In-Memory Caching & Real-Time Data Store
- Latency SLA: Sub-millisecond read and write latency ( p99); scales to QPS per node.
- Architectural Mechanics:
- Cache-Aside (Lazy Loading): Application inspects ElastiCache first; on miss, loads from Amazon Aurora / DynamoDB and writes key back with TTL + randomized jitter.
- Redis Sorted Sets (ZSET): Real-time leaderboard ranking ( insertions and
ZREVRANGEretrievals). - Redis Pub/Sub: Ephemeral multicast message broadcasting across WebSocket edge fleets.
- Distributed Locks & Leases: Atomic lease acquisition (
SET key token NX PX 30000) with fencing tokens.
- High Availability & Failover: Redis Cluster Mode Enabled with up to 500 shards and Multi-AZ automatic failover (). Global Datastore provides cross-region replication with lag.
- Production Gotchas & Memory Tuning:
- Always reserve of instance RAM (
reserved-memory-percent = 25) to prevent Out-Of-Memory (OOM) failures during Redis background snapshotting (BGSAVE). - Configure
volatile-lruorallkeys-lrueviction policies depending on whether keys have explicit expiration TTLs.
- Always reserve of instance RAM (
<a id="dynamodb"></a> Amazon DynamoDB
- Primary Category: Distributed NoSQL Key-Value & Document Database
- Latency SLA: Single-digit millisecond latency ( p99) at any scale; microsecond latency with DynamoDB Accelerator (DAX).
- Architectural Mechanics:
- Single-Table Design: Co-locating heterogeneous entity types in a single table using generic partition keys (
PK/SK) and Global Secondary Indexes (GSIs) for single-partition queries. - DynamoDB Streams: Ordered Change Data Capture (CDC) 24-hour log for downstream search index synchronization, cache invalidation, and asynchronous fanout.
- Idempotency Gate & Conditional Writes:
attribute_not_exists(idempotency_key)preventing duplicate credit card charges and race conditions. - Global Tables: Active-Active multi-region replication with automatic Last-Writer-Wins (LWW) conflict resolution.
- Single-Table Design: Co-locating heterogeneous entity types in a single table using generic partition keys (
- Production Gotchas & Tuning:
- Avoid monotonically increasing partition keys (e.g. timestamps) which cause single-partition throttling ( limit). Apply write sharding / key salting (
pk#0..9).
- Avoid monotonically increasing partition keys (e.g. timestamps) which cause single-partition throttling ( limit). Apply write sharding / key salting (
<a id="aurora"></a> Amazon Aurora (PostgreSQL / MySQL)
- Primary Category: Cloud-Native Relational OLTP Database
- Latency SLA: Low single-digit millisecond ( p99); up to standard MySQL and standard PostgreSQL throughput.
- Architectural Mechanics:
- Log-Structured Storage: Separates compute from storage; database engine writes only REDO logs across a 6-way replicated storage fleet across 3 AZs.
- Aurora Global Database: Hardware storage-level cross-region replication with lag and zero compute penalty on the primary writer.
- Aurora Serverless v2: Instant sub-second scaling in fine-grained Aurora Capacity Units (ACUs) for volatile transaction spikes.
- Production Gotchas & Tuning:
- Always deploy Amazon RDS Proxy when connecting from AWS Lambda to pool and multiplex database connections.
- Offload heavy analytical queries to dedicated Auto-Scaled Aurora Read Replicas.
<a id="s3"></a> Amazon S3 (Simple Storage Service)
- Primary Category: High-Durability Distributed Object Storage & Data Lake
- Latency SLA: Single-digit ms (S3 Express One Zone) / 50-100ms first-byte (Standard); (11 9s) durability.
- Architectural Mechanics:
- Multipart Chunked Uploads: Concurrent multi-part uploads for large files () with checksum verification.
- Presigned URLs: Direct client-to-S3 uploads/downloads bypassing application API compute servers.
- Intelligent-Tiering: Automated lifecycle data movement across Frequent, Infrequent, and Archive tiers saving up to storage cost.
- Production Gotchas & Tuning:
- Partition high-throughput object keys with hash prefixes to scale past the default per prefix limit.
<a id="sqs"></a> Amazon SQS (Simple Queue Service)
- Primary Category: Managed Distributed Message Queuing
- Latency SLA: Sub-10ms delivery latency; unlimited standard throughput; up to with SQS FIFO batching.
- Architectural Mechanics:
- Asynchronous Worker Decoupling: Buffers bursty traffic to protect downstream databases and services.
- SQS FIFO with MessageGroupId: Strict sequential ordering per entity group while scaling horizontally across partitions.
- Dead-Letter Queues (DLQ): Automatic isolation of poison-pill messages after
maxReceiveCountfailures.
- Production Gotchas & Tuning:
- Set Visibility Timeout to Lambda function timeout to prevent premature message visibility and duplicate concurrent processing.
<a id="sns"></a> Amazon SNS (Simple Notification Service)
- Primary Category: High-Throughput Pub/Sub Topic Multicast
- Latency SLA: Sub-second message delivery with virtually unlimited subscriber fanout capacity.
- Architectural Mechanics:
- Fanout Topology: Single publisher writes to an SNS topic; SNS broadcasts the message to multiple subscribed SQS queues (billing, fraud, analytics).
- Message Attribute Filtering: Subscribers receive only matching event subsets without processing unneeded messages.
<a id="kinesis"></a> Amazon Kinesis Data Streams
- Primary Category: Real-Time Ordered Event Streaming Ingestion
- Latency SLA: Sub-second delivery ( standard / with Enhanced Fan-Out).
- Architectural Mechanics:
- Sharded Partition Log: Deterministic hash partition keys guarantee sequential ordering per entity (
user_id,device_id). - Enhanced Fan-Out (EFO): Dedicated HTTP/2 push pipes per consumer group without throttling.
- Managed Apache Flink: Real-time sliding/tumbling window aggregations for ad-click metrics and telemetry.
- Sharded Partition Log: Deterministic hash partition keys guarantee sequential ordering per entity (
<a id="msk"></a> Amazon MSK (Managed Streaming for Apache Kafka)
- Primary Category: Enterprise Managed Apache Kafka Streaming Platform
- Latency SLA: Low single-digit millisecond (); millions of events per second with high partition concurrency.
- Architectural Mechanics:
- Enterprise Event Spine: High-throughput microservice event sourcing and log aggregation.
- MSK Connect & Replicator: Zero-code integration with S3/OpenSearch and active-active cross-region topic replication.
<a id="step-functions"></a> AWS Step Functions
- Primary Category: Serverless Visual Workflow & Saga Orchestrator
- Latency SLA: Sub-second state transitions (Standard) / execution overhead (Express).
- Architectural Mechanics:
- Distributed Saga Orchestrator: Central state machine coordinating multi-step transactions across Lambda, ECS, and Stripe with explicit Catch compensation blocks.
- Task Token Callback (
.waitForTaskToken): Pauses execution until an external worker or approval returns a token.
<a id="opensearch"></a> Amazon OpenSearch Service
- Primary Category: Distributed Full-Text Search, Analytics & Vector Database
- Latency SLA: Low single-digit millisecond query response ().
- Architectural Mechanics:
- Edge-NGram Typeahead: Sub-10ms prefix search autocomplete with typo tolerance and BM25 ranking.
- k-NN Vector Similarity Search: HNSW and IVF graph vector indexes for semantic retrieval and RAG architectures.
<a id="api-gateway"></a> Amazon API Gateway
- Primary Category: Serverless API Ingress, Proxy & WebSocket Manager
- Latency SLA: Sub-10ms proxy overhead; handles tens of thousands of concurrent connections.
- Architectural Mechanics:
- WebSocket Connection State: Manages persistent bidirectional TCP connections at the edge; pushes messages asynchronously via
@connectionsAPI. - Lambda Authorizers: Edge JWT token validation with 300s IAM policy caching.
- Token-Bucket Throttling: Burst and steady-state rate limiting per API key.
- WebSocket Connection State: Manages persistent bidirectional TCP connections at the edge; pushes messages asynchronously via
<a id="cloudfront"></a> Amazon CloudFront
- Primary Category: Global Content Delivery Network (CDN) & Edge Security
- Latency SLA: Sub-10ms edge caching across 600+ PoPs worldwide.
- Architectural Mechanics:
- Origin Shield: Intermediate caching layer reducing backend origin load by up to .
- CloudFront Functions: Sub-millisecond JavaScript edge compute for URL rewrites and normalized cache keys.
- Signed URLs / Cookies: Tokenized private media delivery for video streaming platforms.
<a id="route-53"></a> Amazon Route 53
- Primary Category: Authoritative DNS & Intelligent Traffic Router
- Latency SLA: Sub-20ms global DNS resolution; SLA availability.
- Architectural Mechanics:
- Latency-Based & Geolocation Routing: Directs users to the closest healthy AWS region.
- Application Recovery Controller (ARC): Multi-region routing controls for zero-downtime disaster recovery.
<a id="waf"></a> AWS WAF & AWS Shield
- Primary Category: Layer 7 Web Application Firewall & DDoS Mitigation
- Latency SLA: Sub-millisecond inline packet inspection (< 1ms).
- Architectural Mechanics:
- Rate-Based IP Throttling: Automatically blocks client IP addresses issuing requests per 5 minutes.
- Managed OWASP Top 10 Rule Sets: Filters SQL injection and XSS before requests reach backend compute.
<a id="aws-lambda"></a> AWS Lambda
- Primary Category: Event-Driven Serverless Compute Engine
- Latency SLA: Sub-millisecond execution start (warm) / 50–300ms cold start.
- Architectural Mechanics:
- Stream/Queue Event Source Mapping: Managed polling from SQS, DynamoDB Streams, and Kinesis with automatic batching.
- RDS Proxy Connection Multiplexing: Eliminates database connection pool exhaustion during concurrency bursts.
<a id="ecs-fargate"></a> Amazon ECS Fargate
- Primary Category: Serverless Container Management & Microservice Orchestration
- Latency SLA: Sub-millisecond internal microservice communication.
- Architectural Mechanics:
- Stateless Microservice Fleets: High-throughput Go, Node.js, C#, or Java backends behind ALBs.
- Target Tracking Auto-Scaling: Dynamic container scaling based on ALB RequestCountPerTarget.
<a id="memorydb"></a> Amazon MemoryDB for Redis
- Primary Category: Durable In-Memory Database with Redis OSS API Compatibility
- Latency SLA: Microsecond read latency (< 100µs); low single-digit ms write.
- Architectural Mechanics:
- Multi-AZ Transaction Log: Writes committed to an immutable Multi-AZ transaction log before acknowledgment, delivering Redis speed with zero data loss.
<a id="appsync"></a> AWS AppSync
- Primary Category: Managed GraphQL & Real-Time WebSocket Pub/Sub
- Latency SLA: Sub-10ms GraphQL query execution.
- Architectural Mechanics:
- GraphQL Subscriptions: Real-time push to mobile and web clients over managed WebSocket channels.
- Offline Delta Sync & Conflict Resolution: Built-in Optimistic Concurrency Control (OCC) and Auto-Merge for offline mobile apps.