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.
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
| Service | What it is for | Lesson |
|---|---|---|
| SQS (standard / FIFO) | Durable queue; one consumer group pulls work at its own pace | SQS |
| SNS | Push one message to many subscribers (SQS, Lambda, HTTP, email, SMS) with filter policies | SNS |
| EventBridge | Content-based routing of business events; archive/replay; Pipes; Scheduler | EventBridge |
| Step Functions | Orchestrated workflows, retries, catch, compensation, human approval | Step Functions |
| Kinesis Data Streams / MSK | Ordered, replayable log read by many consumers | Kinesis and MSK |
| Amazon MQ | Managed ActiveMQ/RabbitMQ for JMS/AMQP systems you cannot change | Amazon MQ |
| DynamoDB | Idempotency store (conditional writes + TTL) | Idempotency |
| Cloud Map / ECS Service Connect | Service discovery for microservices | Microservices |
| AWS.Messaging | .NET publisher/handler framework over SQS, SNS, EventBridge | AWS.Messaging |
.NET / Azure → AWS
| Microsoft / Azure | AWS |
|---|---|
| Service Bus queue, peek-lock | SQS, visibility timeout (no explicit lock/complete) |
| Service Bus topic + subscriptions | SNS topic + SQS subscriptions with filter policies |
| Event Grid | EventBridge |
| Event Hubs | Kinesis Data Streams / MSK |
| Durable Functions | Step Functions |
MaxDeliveryCount + dead-letter sub-queue | maxReceiveCount + separate DLQ |
| Duplicate detection | FIFO dedup (5 min) + your own idempotency store |
| MassTransit / NServiceBus | AWS.Messaging |
| MSMQ / IBM MQ / on-prem ActiveMQ | Amazon MQ (IBM MQ has no engine there) |
Most useful CLI commands
| Task | Command |
|---|---|
| Queue depth and age | aws 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 DLQ | aws sqs start-message-move-task --source-arn $DLQ_ARN --destination-arn $SRC_ARN |
| Publish to SNS | aws sns publish --topic-arn $ARN --message-attributes ... |
| Subscriptions | aws sns list-subscriptions-by-topic --topic-arn $ARN |
| Send a test event | aws events put-events --entries file://event.json |
| Test a pattern | aws events test-event-pattern --event-pattern ... --event ... |
| Start / inspect a workflow | aws stepfunctions start-execution · describe-execution |
| Stream records | aws kinesis put-record --partition-key ... · get-shard-iterator |
| Partial batch failures | aws lambda update-event-source-mapping --function-response-types ReportBatchItemFailures |
| Find leftovers | aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab |
Key limits and defaults
| Item | Value |
|---|---|
| SQS message size | 1 MiB (billed in 64 KB chunks); larger payloads go to S3 |
| SQS retention | Default 4 days; 60 seconds to 14 days |
| SQS visibility timeout | Default 30 s; 0 to 12 hours; for Lambda use at least 6 x function timeout |
| SQS delay / long poll | Delay up to 15 min; long poll up to 20 s |
| SQS FIFO dedup window | 5 minutes, fixed |
| SQS in flight | About 120,000 messages per queue |
| SQS free tier | 1 million requests per month |
| SNS delivery retries | SQS/Lambda about 23 days; email/SMS/push about 6 hours; HTTP/S customisable, max 3,600 s |
| SNS FIFO topic | 100 subscriptions; 3,000 messages per second per topic |
| EventBridge target retry | Default 24 h and 185 attempts; replay is not ordered within a minute |
EventBridge PutEvents | Up to 10 entries per request (classic bus) ⚠ VERIFY; check FailedEntryCount |
| Step Functions Standard / Express | 1 year / 5 minutes; Standard exactly-once, Express at-least-once (async) |
| Step Functions payload / history | 256 KiB per state; 25,000 history events |
| Kinesis shard | Write 1 MB/s or 1,000 records/s; read 2 MB/s; retention 24 h to 365 days |
| Amazon MQ to Lambda | 5 concurrent executions per ActiveMQ mapping, 1 per RabbitMQ mapping; queues only |
| SDK for .NET retries | Standard mode: MaxErrorRetry 2 (3 attempts) |
Decision rules
| If you need… | Choose |
|---|---|
| One consumer group, buffering, retries | SQS |
| Several independent consumers of one message | SNS to SQS fan-out |
| Route by event content, replay history, many targets | EventBridge bus and rules |
| Point-to-point with filter and enrichment | EventBridge Pipe |
| Order and replay of a high-volume log | Kinesis (or MSK for Kafka clients) |
| Multi-step process with compensation | Step Functions Standard (saga) |
| High-volume, short, idempotent steps | Step Functions Express |
| State change plus event, atomically | Outbox in the same database transaction |
| Existing JMS/AMQP clients you cannot change | Amazon MQ, bridged to native services |
| Order per account | SQS FIFO with MessageGroupId = account ID |
| Safe repeat of any money-moving call | Idempotency 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
.waitForTaskTokenand.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
| Trap | Avoid it by |
|---|---|
| Amazon MQ or MSK left running | Hourly billing; design-only or delete the same day |
| Kinesis stream left up | Billed while idle; destroy within the hour |
| Short polling and empty receives | Long polling (20 s) and batching |
| Large messages | Each 64 KB is a request; store big payloads in S3 |
| Endless retry loops | Cap attempts, set a DLQ and an alarm on DLQ depth |
| SSE-KMS on busy queues | Per-request KMS cost; reuse data keys or use SSE-SQS |
| Long archive retention | Archives 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.
Module project: banking transaction notification system
Build, break and repair a notification system: EventBridge to SNS to SQS to Lambda in .NET, with idempotent handlers, retries with backoff, a poison message in a DLQ, redrive after a fix and recovery from a downstream outage, using the m08-notification-system lab.
Module 9: DevOps & CI/CD
Move from Azure DevOps pipelines to AWS-ready delivery: GitHub Actions with OIDC (no stored AWS keys) or CodePipeline, CodeBuild and CodeDeploy. You build a pipeline that tests, scans and deploys an ASP.NET Core API with blue/green releases, production approval and automatic rollback, producing the audit evidence banks require.