SkillSprout
Chapter 5 · Lesson 3
Beginner
5 min read

Application Integration Services

Overview

Modern applications are made of many parts. If the parts call each other directly and one slows down, everything stalls. Application integration services let the parts communicate through messages and events, so they stay decoupled and can scale or fail independently.

Consider a restaurant again. Waiters place order tickets on a rail (SQS queue) for cooks to pick up when ready. A manager shouts "table 5 is ready" and everyone on the team hears it (SNS topic). A rulebook says "when a delivery arrives, tell the storeroom" (EventBridge), and a recipe card coordinates multi-step dishes (Step Functions).

Learn the one-line purpose of each service; the exam often asks which service decouples components or fans a message out.

Key Concepts

  • Amazon SQS is a fully managed message queue: producers send messages, consumers poll and process them later (pull model).
  • Amazon SNS is a publish/subscribe notification service that pushes messages to many subscribers (email, SMS, HTTP, Lambda, SQS).
  • Amazon EventBridge is a serverless event bus that routes events from AWS services, SaaS and your apps using rules.
  • AWS Step Functions orchestrates multi-step workflows with visual state machines across Lambda and other services.
  • Amazon API Gateway creates, publishes and secures REST, HTTP and WebSocket APIs in front of backends such as Lambda.
  • Amazon MQ is a managed message broker for ActiveMQ and RabbitMQ, useful for migrating existing apps.
  • Decoupling improves resilience: if a consumer fails, messages wait in the queue instead of being lost.
  • Fan-out pattern: publish once to an SNS topic and deliver to many SQS queues or functions.

Detailed Notes

Pick the right messaging service

ServiceModelTypical use
SQSQueue (pull), one consumer processes each messageBuffer work, decouple tiers, absorb spikes
SNSPub/sub (push)Notifications, alerts, fan-out
EventBridgeEvent bus with rulesReact to AWS or SaaS events, scheduled tasks
Step FunctionsWorkflow orchestrationOrder processing with retries and branches
API GatewayAPI front doorExpose Lambda or HTTP backends securely
Amazon MQManaged brokerLift-and-shift apps using JMS/AMQP/MQTT

Queue versus topic

QuestionSQSSNS
DeliveryConsumers pullSNS pushes to subscribers
Number of receivers per messageOne consumer group handles each messageMany subscribers each get a copy
PersistenceStores messages (up to 14 days)Does not store; delivers immediately (retry policies)

SQS queue types

TypeBehaviour
StandardNearly unlimited throughput, at-least-once delivery, best-effort ordering
FIFOExactly-once processing, strict ordering within a message group

Fan-out pattern

Publish a single "order placed" message to an SNS topic and subscribe three SQS queues: one for billing, one for shipping and one for analytics. Each team consumes at its own speed, and adding a new consumer needs no change to the publisher.

bash
aws sns create-topic --name order-events
aws sqs create-queue --queue-name billing-queue
aws sns subscribe --topic-arn arn:aws:sns:ap-south-1:111122223333:order-events \
  --protocol sqs --notification-endpoint arn:aws:sqs:ap-south-1:111122223333:billing-queue
aws sns publish --topic-arn arn:aws:sns:ap-south-1:111122223333:order-events --message "order 42 placed"

EventBridge rule example

json
{
  "source": ["aws.ec2"],
  "detail-type": ["EC2 Instance State-change Notification"],
  "detail": { "state": ["terminated"] }
}

This pattern matches EC2 termination events and can send them to a Lambda function or an SNS topic.

Orchestration and APIs

  • Step Functions models a workflow as states with retries and error handling, avoiding custom glue code.
  • API Gateway adds authorisation, throttling, caching and monitoring in front of backends, and is a common pairing with Lambda for serverless APIs.

Event-driven building blocks

ServiceTrigger style
S3 eventsObject created or deleted invokes Lambda, SQS or SNS
EventBridgeRules match events from AWS services, SaaS and custom apps, plus schedules
SNSPush to many subscribers
SQSConsumers pull at their own pace

Why decoupling matters

Tightly coupled systems fail together. With queues and events: spikes are absorbed, failures are isolated, teams deploy independently and components scale on their own. This supports the Well-Architected Reliability pillar.

Real World Example

A food-delivery app publishes an "order placed" event to an SNS topic. Three SQS queues subscribe: payments, restaurant notification and analytics. During a lunchtime rush the restaurant service falls behind, but its queue simply grows and drains later - no orders are lost and payments are unaffected.

Step Functions coordinates the refund workflow, and API Gateway exposes the ordering API to the mobile app, backed by Lambda.

Architecture Diagram

SNS to SQS fan-out
Architecture
AWS Cloud
API Gateway
SNS topicorder-events
Billing queue
Shipping queue
Analytics queue
Consumers
  1. 1The client sends an order through API Gateway.
  2. 2The order event is published to an SNS topic.
  3. 3SNS delivers a copy to each subscribed SQS queue.
  4. 4Each consumer polls its own queue and processes at its own pace.

Best Practices

  • ✓Decouple tiers with SQS so spikes and failures do not cascade.
  • ✓Use dead-letter queues to capture messages that repeatedly fail.
  • ✓Use SNS + SQS fan-out to deliver one event to several systems.
  • ✓Choose FIFO queues only when ordering or exactly-once processing is required.
  • ✓Use EventBridge for event-driven automation instead of polling.

Common Interview Questions

Exam Tips

CLF-C02 focus

  • "Decouple / buffer messages" = SQS; "send notifications to many subscribers" = SNS.
  • "Event bus / react to events" = EventBridge.
  • "Coordinate multiple steps in a workflow" = Step Functions.
  • "Create REST APIs for Lambda" = API Gateway.

Finished this lesson?

0 of 43 lessons done · 0% of the course