How do you decouple components on AWS using SQS, SNS and EventBridge?
Decoupling means components communicate through a message service rather than calling each other directly, so one being slow or unavailable does not cascade.
- SQS — a queue, one-to-one. A producer writes a message; one consumer processes and deletes it. It absorbs traffic spikes, so a burst queues rather than overwhelming the consumer. Standard queues give at-least-once delivery and best-effort ordering; FIFO queues give exactly-once processing and strict ordering at lower throughput.
- SNS — pub/sub, one-to-many. A message published to a topic is pushed to every subscriber — Lambda functions, SQS queues, HTTP endpoints, email. Use it to fan one event out to several independent consumers.
- EventBridge — an event bus with routing and filtering. Events are matched against rules on their content and routed to targets. It also receives events from AWS services and SaaS partners, and supports schema discovery and archive-and-replay. Use it for event-driven architectures where routing logic matters.
The common pattern is SNS fanning out to several SQS queues, giving both broadcast and per-consumer buffering with independent retry.
Essential practices: configure a dead letter queue so messages that repeatedly fail are captured rather than lost or retried forever; and make consumers idempotent, because at-least-once delivery means the same message can arrive twice.





