Skip to Content
Cloud Engineering Academy
8. Messaging, Events & Microservices

Module 8 cheat sheet

One-page revision summary for Messaging, Events & Microservices: services, Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.

DVA-C03SAA-C03DEA-C01

Assumes: AWS CLI v2 · AWS SDK for .NET v4 · AWS.Messaging 1.6.0 · Powertools for AWS Lambda (.NET) 3.2.x · Region us-east-1 · facts as stated in the Module 8 lessons (checked 2026-11-18). Verified against official sources on 2026-11-18.

A printable summary of Module 8. Rows link back to the lesson with the detail.

Key services

ServiceWhat it is forLesson
SQS (standard / FIFO)Durable queue; one consumer group pulls work at its own paceSQS
SNSPush one message to many subscribers (SQS, Lambda, HTTP, email, SMS) with filter policiesSNS
EventBridgeContent-based routing of business events; archive/replay; Pipes; SchedulerEventBridge
Step FunctionsOrchestrated workflows, retries, catch, compensation, human approvalStep Functions
Kinesis Data Streams / MSKOrdered, replayable log read by many consumersKinesis and MSK
Amazon MQManaged ActiveMQ/RabbitMQ for JMS/AMQP systems you cannot changeAmazon MQ
DynamoDBIdempotency store (conditional writes + TTL)Idempotency
Cloud Map / ECS Service ConnectService discovery for microservicesMicroservices
AWS.Messaging.NET publisher/handler framework over SQS, SNS, EventBridgeAWS.Messaging

.NET / Azure → AWS

Microsoft / AzureAWS
Service Bus queue, peek-lockSQS, visibility timeout (no explicit lock/complete)
Service Bus topic + subscriptionsSNS topic + SQS subscriptions with filter policies
Event GridEventBridge
Event HubsKinesis Data Streams / MSK
Durable FunctionsStep Functions
MaxDeliveryCount + dead-letter sub-queuemaxReceiveCount + separate DLQ
Duplicate detectionFIFO dedup (5 min) + your own idempotency store
MassTransit / NServiceBusAWS.Messaging
MSMQ / IBM MQ / on-prem ActiveMQAmazon MQ (IBM MQ has no engine there)

Most useful CLI commands

TaskCommand
Queue depth and ageaws sqs get-queue-attributes --queue-url $URL --attribute-names All
Send / receive (long poll)aws sqs send-message ... · aws sqs receive-message --wait-time-seconds 20
Redrive a DLQaws sqs start-message-move-task --source-arn $DLQ_ARN --destination-arn $SRC_ARN
Publish to SNSaws sns publish --topic-arn $ARN --message-attributes ...
Subscriptionsaws sns list-subscriptions-by-topic --topic-arn $ARN
Send a test eventaws events put-events --entries file://event.json
Test a patternaws events test-event-pattern --event-pattern ... --event ...
Start / inspect a workflowaws stepfunctions start-execution · describe-execution
Stream recordsaws kinesis put-record --partition-key ... · get-shard-iterator
Partial batch failuresaws lambda update-event-source-mapping --function-response-types ReportBatchItemFailures
Find leftoversaws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab

Key limits and defaults

ItemValue
SQS message size1 MiB (billed in 64 KB chunks); larger payloads go to S3
SQS retentionDefault 4 days; 60 seconds to 14 days
SQS visibility timeoutDefault 30 s; 0 to 12 hours; for Lambda use at least 6 x function timeout
SQS delay / long pollDelay up to 15 min; long poll up to 20 s
SQS FIFO dedup window5 minutes, fixed
SQS in flightAbout 120,000 messages per queue
SQS free tier1 million requests per month
SNS delivery retriesSQS/Lambda about 23 days; email/SMS/push about 6 hours; HTTP/S customisable, max 3,600 s
SNS FIFO topic100 subscriptions; 3,000 messages per second per topic
EventBridge target retryDefault 24 h and 185 attempts; replay is not ordered within a minute
EventBridge PutEventsUp to 10 entries per request (classic bus) ⚠ VERIFY; check FailedEntryCount
Step Functions Standard / Express1 year / 5 minutes; Standard exactly-once, Express at-least-once (async)
Step Functions payload / history256 KiB per state; 25,000 history events
Kinesis shardWrite 1 MB/s or 1,000 records/s; read 2 MB/s; retention 24 h to 365 days
Amazon MQ to Lambda5 concurrent executions per ActiveMQ mapping, 1 per RabbitMQ mapping; queues only
SDK for .NET retriesStandard mode: MaxErrorRetry 2 (3 attempts)

Decision rules

If you need…Choose
One consumer group, buffering, retriesSQS
Several independent consumers of one messageSNS to SQS fan-out
Route by event content, replay history, many targetsEventBridge bus and rules
Point-to-point with filter and enrichmentEventBridge Pipe
Order and replay of a high-volume logKinesis (or MSK for Kafka clients)
Multi-step process with compensationStep Functions Standard (saga)
High-volume, short, idempotent stepsStep Functions Express
State change plus event, atomicallyOutbox in the same database transaction
Existing JMS/AMQP clients you cannot changeAmazon MQ, bridged to native services
Order per accountSQS FIFO with MessageGroupId = account ID
Safe repeat of any money-moving callIdempotency key stored with a conditional write

Common exam traps

  • Standard SQS is at-least-once and unordered. FIFO orders per message group only, and its dedup window is 5 minutes.
  • Lambda poison messages: without ReportBatchItemFailures, one bad record fails the whole batch and the good ones are retried.
  • DLQ type must match (standard to standard, FIFO to FIFO); give it longer retention than the source queue.
  • SNS subscription DLQ and SQS consumer DLQ are different queues for different failures.
  • EventBridge drops events when retries are exhausted unless the target has a DLQ.
  • A replay is a duplicate: consumers must be idempotent.
  • Kinesis: one failing record blocks its shard; order is per shard, not per stream.
  • Step Functions: Standard supports .waitForTaskToken and .sync; Express does not. The workflow type cannot be changed.
  • Exactly-once does not cover side effects outside the service (an SMS, a payment).
  • Amazon MQ is a broker you size and pay for hourly; SQS is serverless.

Cost traps

TrapAvoid it by
Amazon MQ or MSK left runningHourly billing; design-only or delete the same day
Kinesis stream left upBilled while idle; destroy within the hour
Short polling and empty receivesLong polling (20 s) and batching
Large messagesEach 64 KB is a request; store big payloads in S3
Endless retry loopsCap attempts, set a DLQ and an alarm on DLQ depth
SSE-KMS on busy queuesPer-request KMS cost; reuse data keys or use SSE-SQS
Long archive retentionArchives keep personal data and cost storage; agree retention

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page