Roadmap › Amazon Web Services (AWS) for .NET and Full Stack Developers › Module: Networking, Integration and Security
Lessons in this course (9)

6. Messaging and events — SQS, SNS, EventBridge, Kinesis and Step Functions

Intermediate★ Must knowLesson 6 of 9
ServicePatternUse
SQSQueue (standard: at-least-once, best-effort order; FIFO: exactly-once processing, ordered)Decouple services, background jobs, buffering
SNSPub/sub topic → many subscribers (SQS, Lambda, HTTP, email, SMS)Fan-out notifications
EventBridgeEvent bus with rules routing events (AWS services, SaaS, your apps), schedulerEvent-driven architectures, cron jobs
Kinesis Data Streams / MSKOrdered, replayable streamsClickstreams, IoT telemetry, analytics
Step FunctionsWorkflow/state machine orchestrationSagas, multi-step processes with retries
csharp
var sqs = new AmazonSQSClient();
await sqs.SendMessageAsync(queueUrl, JsonSerializer.Serialize(new OrderPlaced(orderId)));
var resp = await sqs.ReceiveMessageAsync(new ReceiveMessageRequest { QueueUrl = queueUrl, MaxNumberOfMessages = 10, WaitTimeSeconds = 20 });   // long polling
foreach (var m in resp.Messages)
{
    await HandleAsync(m.Body);                                  // idempotent handler
    await sqs.DeleteMessageAsync(queueUrl, m.ReceiptHandle);    // delete only after success; otherwise it reappears after the visibility timeout
}

Dead-letter queues capture messages that fail repeatedly (maxReceiveCount).