cert-bank

Guides

이 글을 한국어로 읽기

SQS vs SNS vs EventBridge (and When Kinesis Instead): Four Questions That Pick the Service

Amazon SQS, Amazon SNS and Amazon EventBridge all sit between a producer and its consumers, and all are serverless. In an exam question they often appear as three of the four options, with Amazon Kinesis Data Streams as the fourth. They are not interchangeable: each answers a different question about how a message should travel. This comparison gives you four questions to ask the stem, in order, and the clues that answer each one.

Concept comparison · SAA-C03, DVA-C03, SAP-C03, DEA-C01, DOP-C02

SQS vs SNS vs EventBridge (and When Kinesis Instead): Four Questions That Pick the Service

Where this shows up

We counted how many questions in our own practice banks are tagged with each service. The developer and architect exams use all four; DevOps and the data engineer exam lean towards EventBridge and Kinesis.

Exam (questions in our bank)SQSSNSEventBridgeKinesis
DVA-C03 (470)1911137
SAP-C03 (509)177165
SAA-C03 (395)14345
DEA-C01 (395)961416
DOP-C02 (395)68296

SOA-C03 and SCS-C03 also use EventBridge often, but mostly as the trigger for automated remediation rather than as a messaging choice, so they are not the focus here.

Question 1: one worker, or many receivers?

An SQS message is received and deleted by one consumer. That makes a queue the right tool for a work queue: buffering bursts, letting a slow consumer work at its own pace, and isolating the producer from a consumer that is down. It also means SQS on its own cannot broadcast. If the same event must reach billing, inventory and analytics, each of them needs its own copy. That is publish-subscribe: SNS, or EventBridge.

Question 2: does the route depend on what is inside the event, or where it came from?

SNS pushes a copy of each message to every subscription of a topic, and a subscription filter policy can drop messages a subscriber does not want. EventBridge is built around routing: events arrive from AWS services on the default bus, from your code on custom buses, or from SaaS partners, and rules match on any field of the event (for example a source of "orders" and an amount above 1,000) and send matches to targets, optionally reshaped. EventBridge can also archive events and replay them after you fix a consumer, and its Scheduler runs one-time or recurring invocations. The rules-and-targets bus described here is now called Custom Event Bus - Classic; EventBridge also offers a newer Custom Event Bus, where each subscriber delivers matching events to one target and the bus retains every event for 1 to 365 days, with FIFO delivery within an event group. Choose SNS for straightforward high fan-out to known subscribers, including email, SMS and mobile push. Choose EventBridge when the stem talks about events from AWS services or SaaS applications, routing by content, many rules, cross-account event buses, or replay.

Question 3: must several applications read the same ordered records, and read them again?

This is where Kinesis Data Streams takes over. A stream keeps records for a retention period (24 hours by default, extendable up to 365 days) whether or not anyone has read them. Every consumer application reads the whole stream independently and keeps its own position, so a new application can start from the beginning and a broken one can rewind. Records with the same partition key go to the same shard and stay in order there. Clues: clickstreams, telemetry, "several teams process the same events", "reprocess the last two days", "in order per device". If the stem only says "deliver the stream into S3 or Redshift", Amazon Data Firehose is the lower-effort answer. The newer EventBridge Custom Event Bus (Question 2) also retains events and lets a new subscriber start from a point in the past, so read the stem closely: shards, partition keys, clickstreams and telemetry still point to Kinesis.

Question 4: does order or exactly-once matter?

Standard SQS queues and standard SNS topics give best-effort ordering and can deliver a message more than once. FIFO queues (and SNS FIFO topics paired with FIFO queues, for ordered fan-out) keep order within a message group ID and drop duplicates sent within a five-minute deduplication window, using a deduplication ID or a hash of the body. In Kinesis, order is per shard, chosen by the partition key. On the newer EventBridge Custom Event Bus, a FIFO subscriber keeps order within an event group. In every case order is scoped: per message group, per event group, per partition key, never across everything at scale.

SQS, SNS, EventBridge or Kinesis: which one does the stem want?
Is the only job to deliver a stream into S3 or Redshift?
YES →
Amazon Data Firehose
↓ no
Must several applications read the same ordered records, and read them again?
YES →
Kinesis Data Streams
↓ no
Does each message go to one worker: buffer, decouple, retry later?
YES →
Amazon SQS (FIFO if order or exactly-once matters)
↓ no
Routing by content, AWS service or SaaS events, a schedule, or replay after a fix?
YES →
Amazon EventBridge
↓ no
OTHERWISE →
Amazon SNS: fan out to known subscribers, including email, SMS and mobile push
Read from the top: the first question answered yes names the service, and order is always per group or key.

The summary table

SQSSNSEventBridgeKinesis Data Streams
ModelQueue; consumers pullTopic; pushes to subscribersEvent bus; rules routeOrdered log; consumers read
Who gets a messageOne consumerEvery subscriber (after filters)Every target of every matching ruleEvery consumer application
Kept after deliveryNo; deleted when processedNo (FIFO topics: only if you archive)Classic bus: only if you archive; Custom Event Bus: yes, for its retention periodYes, for the retention period
Typical stem wordsbuffer, decouple, retry later, spikesfan out, notify, email, SMSroute by content, AWS service events, SaaS, schedulereal-time stream, replay, multiple readers

Beginner tip: build the fan-out pattern once, in the console, in ten minutes. Create one SNS topic and two SQS queues named billing and analytics, subscribe both queues, and give the billing subscription a filter policy that accepts only {"eventType": ["refund"]}. Publish one message with the attribute eventType=refund and one with eventType=order, then poll both queues. Seeing the analytics queue receive both while billing receives one makes "SNS to multiple SQS queues" and "filter policies" concrete; delete everything afterwards.

Combinations that exam answers use

  • SNS to several SQS queues: fan-out where each consumer can fail or fall behind without affecting the others, because its messages wait in its own queue.
  • EventBridge rule to an SQS queue: content-based routing with a buffer in front of a consumer that cannot take bursts.
  • S3 events to EventBridge: when one upload must trigger several targets or filters beyond prefix and suffix.
  • Kinesis Data Streams to Firehose: real-time consumers on the stream, plus a no-code copy landing in S3.
Going deeper: why "never charge twice" is answered in the consumer, not the transport

Duplicates have more than one source. A standard queue can occasionally deliver the same message twice. A producer that times out and retries sends a second message with a new message ID for the same business event, which no transport can recognize as a duplicate unless it carries the same deduplication ID. And a consumer that runs longer than the SQS visibility timeout lets the message become visible again, so a second consumer processes it too (for Lambda consumers AWS recommends a visibility timeout of at least six times the function timeout). FIFO deduplication helps with the first two only within its five-minute window. The robust answer is an idempotent consumer: record a key taken from the business data, such as the order ID, with a conditional write (for example a DynamoDB PutItem with attribute_not_exists) before or together with the side effect, and treat a failed condition as "already done".

Traps to recognize

  • SQS offered for "notify three systems": one queue gives each message to one consumer.
  • A single message group ID or a constant partition key "to keep order": everything goes through one sequence and throughput collapses; use a key per customer or device.
  • More consumers added to fix a backlog on a FIFO queue with one message group: they cannot work in parallel on the same group.
  • EventBridge rules on a Classic bus chosen to let five applications re-read yesterday's telemetry in order: rules forward events and keep none unless archived; that is a stream, not a bus.

Practise

Practise in the question bank: every question explains each option, right and wrong. Start with the domain you just studied, then take a timed mock exam.

Counts from our own question bank at the time of writing. Service features and limits change; check the current AWS documentation for SQS, SNS, EventBridge and Kinesis.