Scalable, Loosely Coupled Architectures: SQS, SNS, EventBridge, Step Functions
A loosely coupled architecture connects its components through managed intermediaries (queues, topics, event buses, load balancers and APIs) so that each component can scale, fail and change without dragging the others with it. SAA-C03 Task 2.1 covers the services that make this work: queuing with Amazon SQS, publish/subscribe with SNS, event routing with EventBridge, workflow orchestration with Step Functions, API Gateway as a managed front door, the compute choice among Lambda, Fargate and ECS or EKS on EC2, and the scaling levers around them: Auto Scaling policies, load balancers, caches, the edge, read replicas and the right storage type. The exam rarely asks what a queue is. It hands you a tightly coupled system that drops orders during a flash sale, or one event that five downstream systems must react to, and asks which design fixes it with the least operational overhead. By the end of this lesson you will be able to pick the integration service, compute layer, scaling policy and data-tier lever that a scenario calls for, and explain why each runner-up option loses.
What you’ll learn
- Explain why loose coupling improves both resilience and scaling, and spot tight coupling inside a scenario
- Configure SQS correctly: standard vs FIFO, message group and deduplication IDs, visibility timeout, retention, dead-letter queues and Lambda consumers
- Select SQS, SNS, EventBridge, Step Functions or API Gateway from a scenario's requirements, including FIFO fan-out, cross-account events and Express vs Standard workflows
- Decide between Lambda, Fargate and ECS or EKS on EC2, and migrate an application into containers without losing state, logs or secrets
- Choose an Auto Scaling policy and a load balancer for a workload, and scale queue consumers on backlog per instance
- Apply caching strategies, CloudFront or Global Accelerator, read replicas and the right storage type (object, file, block) to the bottleneck a scenario names
The 17 parts · about 27 min of reading
- Why loose coupling means resilience and independent scalingStart hereA managed intermediary between tiers keeps work durable when a consumer fails and lets each tier scale on its own signal.2 min
- SQS decisionsDefault to standard queues with idempotent consumers, choose FIFO only for per-entity order, and set visibility above processing time.3 min
- SQS in practiceSize retention to the longest outage, catch poison messages in a same-type DLQ, and give Lambda consumers partial batch responses.2 min
- SNS pub/sub and the SNS-to-SQS fan-out patternSNS delivers every message to every subscriber, so subscribe one SQS queue per consumer for a durable buffer, retries and its own scaling.1 min
- EventBridge: event routing, SaaS integration, and choosing among the threeUse SQS for one consumer group's backlog, SNS for high-throughput fan-out, and EventBridge for AWS or SaaS events, rich targets and replay.2 min
- Step FunctionsOrchestrate ordered multi-step work with per-step retries in Step Functions, not chained Lambda functions; Standard suits approvals.2 min
- API GatewayAPI Gateway gives clients a stable contract over swappable backends; per-client quotas need a REST API with usage plans and API keys.3 min
- Compute selectionLambda fits event-driven work under 15 minutes, Fargate long-running containers without servers, and ECS or EKS on EC2 needs GPUs.2 min
- Migrating applications into containersSend logs to stdout, secrets to the task definition, sessions to ElastiCache or DynamoDB and shared files to EFS so tasks are disposable.1 min
- Purpose-built managed servicesAutomatic credential rotation needs Secrets Manager, cheap unrotated values fit Parameter Store, and partner SFTP fits Transfer Family.1 min
- Scaling strategiesScale horizontally by default, pair predictive scaling with target tracking, and scale queue workers on backlog per instance, not CPU.1 min
- Load balancingChoose an ALB for HTTP and gRPC per-request balancing, an NLB for non-HTTP or static IPs; sticky sessions are a fallback, not the fix.1 min
- Caching strategiesPick the cache layer first, then use lazy loading or write-through with a TTL sized to the staleness the business accepts.1 min
- The edgeCloudFront caches and cuts origin load; Global Accelerator caches nothing but gives static anycast IPs and fast multi-Region failover.1 min
- Scaling the data tierRead replicas scale reads, Multi-AZ standbys exist for failover, and RDS Proxy pools connections without offloading query CPU.1 min
- Storage typesChoose by access pattern: S3 for objects over an HTTP API, EFS for files shared across AZs, and EBS for one instance's low-latency disk.1 min
- Worked scenariosLost orders under spikes point to an SQS buffer with backlog scaling, and independent consumers of one event point to SNS-to-SQS fan-out.2 min
Mind map
How the exam tests this
SAA-C03 tests this task with redesign scenarios: a tightly coupled system that loses requests during spikes, times out on a slow downstream, or needs code changes for every new consumer, plus a qualifier such as most cost-effective or least operational overhead. Expect the web-to-worker queue insertion, SNS-to-SQS fan-out (including FIFO topics and encrypted queues), EventBridge for AWS or SaaS events and cross-account buses, Step Functions in place of chained Lambda functions, Lambda vs Fargate vs ECS on EC2 against a runtime, GPU or host-agent requirement, and scaling, caching, edge and read-replica choices matched to a named bottleneck. Many questions turn on configuration detail: the message group ID, deduplication vs redelivery, visibility timeout for Lambda consumers, DLQ retention, usage plans vs WAF rate-based rules, the Aurora reader endpoint, and the Auto Scaling policy that fits a known or unknown surge. Traps include vertical scaling offered as the fix for a coupling problem, one shared queue where every consumer needs its own copy, Global Accelerator offered to reduce origin load, a Multi-AZ standby offered for read traffic, and Lambda proposed for a job that runs longer than 15 minutes.
Key takeaways
- A queue between tiers turns a traffic spike into a backlog: SQS plus a worker tier scaling on backlog per instance is the default spike-absorption redesign.
- SQS FIFO orders messages per message group (set the group ID to the entity whose order matters) and deduplicates sends within five minutes by deduplication ID; it does not prevent redelivery after a visibility timeout.
- Retention (default 4 days, up to 14) limits how long a queue can cover an outage; standard-queue DLQs need longer retention than the source, and DLQ redrive moves fixed messages back.
- With Lambda on SQS: visibility timeout at least six times the function timeout, partial batch responses, and the event source mapping's maximum concurrency (not reserved concurrency) to cap load.
- SNS-to-SQS fan-out gives every consumer its own durable buffer; SNS filters on attributes or body, SQS FIFO queues subscribe only to SNS FIFO topics, and EventBridge wins on AWS/SaaS sources, Step Functions targets, cross-account buses and replay.
- Step Functions orchestrates multi-step work; Express workflows stop at five minutes and support neither callbacks nor .sync, and Distributed Map handles millions of S3 items.
- Per-client throttles plus quotas are REST API usage plans; WAF rate-based rules block by rate, not quota. Fargate has no GPUs, privileged containers or per-host daemons.
- Match the lever to the bottleneck: target tracking (plus predictive for cycles, scheduled for known dates), NLB for non-HTTP or static IPs, caches with TTLs, CloudFront to cut origin load, Global Accelerator for static IPs and fast failover, read replicas or custom Aurora endpoints for reads, EFS for shared files.
Part 1: Why loose coupling means resilience and independent scaling
A managed intermediary between tiers keeps work durable when a consumer fails and lets each tier scale on its own signal.
Frequently asked questions
What is the difference between SQS and SNS?
SQS is a pull-based queue: producers send messages, and each message is consumed by one worker from a competing consumer group, with the queue durably buffering work until consumers are ready. SNS is push-based publish/subscribe: one published message is delivered to every subscriber of a topic. Use SQS to decouple and buffer work for one processing tier; use SNS when multiple systems each need a copy of the same message. The two combine in the fan-out pattern — an SNS topic with an SQS queue subscribed per consumer — so every consumer gets pub/sub reach plus a durable, independently scaled buffer.
When should I use EventBridge instead of SNS?
Choose EventBridge when events come from AWS services or SaaS partner applications, when targets include Step Functions, ECS tasks, API destinations or another account's event bus, when you want routing rules managed centrally, or when you need archive and replay to reprocess past events. Choose SNS for straightforward one-to-many delivery at very high throughput and low latency, especially fan-out into SQS queues, and for SMS, email or mobile push notifications. Filtering alone does not separate them: SNS subscription filter policies can match message attributes or fields in the message body. The deciding factor is usually where events come from and which targets must receive them.
What is the SQS visibility timeout and what happens if it is too short?
When a consumer receives an SQS message, the message is not deleted; it becomes invisible to other consumers for the visibility timeout. The consumer deletes it after processing; if the consumer crashes, the timeout expires and the message reappears, which is how SQS retries. If the timeout is shorter than processing time, messages reappear while still being processed and are handled twice, even on a FIFO queue, whose deduplication only covers duplicate sends. Raise the timeout above processing time, extend individual long-running messages with ChangeMessageVisibility, and for Lambda consumers set it to at least six times the function timeout.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.