Use when it fits · AWS · Pub/sub fan-out

Amazon SNS

Fan-out from one publisher to many subscribers. Not my ingestion path at high volume.

Good for fan-out. For ingestion I now put SQS in the path so Lambda can batch.

Use it when

  • One event must reach several queues, functions or emails.

Don't use it when

  • High-volume ingestion straight into Lambda (one invocation per message). Put SQS in the path and batch.

In my words: what hurts

  • I've used it for data ingestion, especially IoT, and don't trust it at very high message rates.

Gotchas, with fixes

Gotcha: SNS → Lambda invokes a function per message: at IoT volumes that's millions of tiny invocations.

Fix: SNS → SQS → Lambda with batching, or skip SNS and write straight to SQS.

Provisioning

Official Pulumi package · Official Terraform provider

@pulumi/aws sns.Topic and TopicSubscription.

Instead, consider

Worked examples

Where it fits

  • Event-driven plumbing: Pick 03.

    Fan-out: one event to several queues or functions.

  • Device and IoT data: Don't.

    SNS invokes Lambda once per message: at device volumes that's millions of tiny invocations. SQS lets Lambda take them in batches.

    Instead: Amazon SQS

Last reviewed by Nicolas Dao

Want this stack in your AWS account?

Cloudless Labs is a Sydney consultancy. We migrate on-premises systems to AWS, build serverless apps on this stack, and coach teams to ship with Claude Code and Codex.

Contact Us

For general inquiries, please contact us at:

For e-learning capabilities, please contact: