Skip to Content

Application Integration

Why applications talk through queues, topics and streams instead of calling each other directly, and the map of this group.

What it is

As soon as more than one application runs, they need to talk to each other. A web shop's buying service has to tell the shipping service about each new order. There are two ways to do it.

Synchronous versus asynchronous communication: with synchronous calls the buying service calls the shipping service directly, so the shipping service must keep up; with asynchronous messaging the buying service sends work to a queue and moves on, and the shipping service processes it at its own pace Synchronous versus asynchronous communication: with synchronous calls the buying service calls the shipping service directly, so the shipping service must keep up; with asynchronous messaging the buying service sends work to a queue and moves on, and the shipping service processes it at its own pace

Calling directly, or leaving the work in a queue.
  • Synchronous (application to application): the buying service calls the shipping service and waits. Simple, but if shipping is slow or down, buying is too. Sudden spikes are a problem: what if 1,000 videos suddenly need encoding when the usual load is 10?
  • Asynchronous or event-based (application to queue to application): the buying service drops a message in a queue and carries on; the shipping service picks it up when it can.

The second way decouples the applications: each one can scale, fail and be updated on its own. AWS offers three models for it:

  • SQS, the queue model;
  • SNS, the pub/sub (publish/subscribe) model;
  • Kinesis, the real-time streaming model.

These services scale independently from the application. The group also covers Amazon MQ (for apps using standard broker protocols), EventBridge (event routing), Step Functions (workflows), AppFlow (SaaS data transfer) and the email and messaging services SES and Pinpoint.

Example

A video site lets users upload videos. The web tier saves each upload to S3 and puts a message in an SQS queue. A fleet of EC2 workers encodes videos from the queue, scaling with its length. When a video is ready, an SNS topic tells the user by email and updates the search index. During a viral spike, uploads keep working: the queue just grows for a while.

In this group

Queues: SQS

Notifications: SNS

Streaming

More integration

Exam tips

  • "Decouple", "absorb spikes", "the backend can't keep up" → SQS between the tiers.
  • "Send one message to many receivers" → SNS (often SNS + SQS fan-out).
  • "Real-time streaming", "clickstream", "IoT data", "replay" → Kinesis Data Streams.
  • "Load streaming data into S3 or Redshift with no code" → Amazon Data Firehose.
  • "Migrate an app that uses MQTT, AMQP or JMS without rewriting it" → Amazon MQ.
  • "React to an event in an AWS service", "cron job" → EventBridge.
  • "Orchestrate several Lambda functions with retries and human approval" → Step Functions.

Common traps

  • "Call the other service's API directly for reliability." Direct calls couple the services; a queue keeps work safe when one side is down.
  • "SNS keeps messages until a subscriber reads them." SNS doesn't store messages; put an SQS queue behind it.

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt