← Back to Home

Cloud Integration

AWS CLF-C02 — SQS, SNS, Kinesis, EventBridge, Amazon MQ, and Communication Patterns

Synchronous vs Asynchronous Communication

Synchronous (Tightly Coupled)

Asynchronous / Event-Based (Loosely Coupled)

Key Point:

AWS recommends decoupling applications using SQS (queue model), SNS (pub/sub model), or Kinesis (streaming model). This increases scalability and fault tolerance.

Amazon SQS (Simple Queue Service)

Fully managed message queue service for decoupling and scaling microservices, distributed systems, and serverless applications.

How It Works

Key Features

SQS Standard vs FIFO

FeatureSQS StandardSQS FIFO
ThroughputUnlimited300 msg/s (without batching), 3000 msg/s (with batching)
OrderingBest-effort ordering (may be out of order)Guaranteed first-in-first-out ordering
DeliveryAt-least-once (possible duplicates)Exactly-once processing (no duplicates)
Queue NameAny valid nameMust end in .fifo
Use CaseHigh throughput, order doesn't matterOrder matters (e.g., financial transactions)
Exam Tip:

SQS = queue model (one consumer processes each message). Standard = high throughput, possible duplicates. FIFO = strict ordering, exactly-once. If the question says "decouple applications," think SQS.

Amazon SNS (Simple Notification Service)

Fully managed pub/sub (publish/subscribe) messaging service for sending notifications.

How It Works

Subscriber Types

SNS + SQS Fan-Out Pattern

A very common architecture pattern:

Key Point:

SQS = queue model (consumer pulls, one-to-one). SNS = pub/sub model (publisher pushes to many subscribers, one-to-many). Fan-out = SNS + SQS together for broadcasting to multiple queues.

Amazon Kinesis

Managed service for real-time streaming data at any scale. Collect, process, and analyze real-time data.

Kinesis Services

ServicePurposeKey Details
Kinesis Data StreamsIngest and store streaming dataReal-time (~200ms). You manage consumers. Retention 1-365 days. Provisioned or on-demand capacity.
Kinesis Data FirehoseLoad streaming data into destinationsNear real-time (60s buffer). Fully managed, serverless. Delivers to S3, Redshift, OpenSearch, HTTP endpoints.
Kinesis Data AnalyticsAnalyze streams with SQL or Apache FlinkReal-time analytics on streaming data. Fully managed.
Kinesis Video StreamsCapture and store video streamsFor ML, analytics, playback. From cameras, security devices, etc.
Exam Tip:

Kinesis = real-time data streaming. Data Streams = ingest (you manage). Data Firehose = deliver to destinations (fully managed). If the question says "real-time" or "streaming data," think Kinesis.

Amazon MQ

Managed message broker service for Apache ActiveMQ and RabbitMQ.

Exam Tip:

Amazon MQ = use when migrating from on-premises with existing protocols (MQTT, AMQP, etc.). For new cloud-native apps, always use SQS/SNS instead. MQ is NOT serverless.

Amazon EventBridge (formerly CloudWatch Events)

Serverless event bus service for building event-driven applications at scale.

Key Features

Advanced Features

Common Targets

Key Point:

EventBridge is the evolution of CloudWatch Events. It adds partner integrations, schema registry, and event archive/replay. It's the central event bus for event-driven architectures on AWS.

Integration Services Comparison

ServiceModelBest For
SQSQueue (pull)Decoupling, buffering, one-to-one
SNSPub/Sub (push)Notifications, one-to-many fan-out
KinesisStreamingReal-time data processing, big data
EventBridgeEvent BusEvent-driven architecture, scheduled tasks, partner events
Amazon MQMessage BrokerMigrating on-prem brokers (ActiveMQ/RabbitMQ)