> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon SNS

> Publish to a standard SNS topic and consume its notifications through SQS.

Use the [Streams mount example](https://docs.bijection.com/integrations/native-kinesis.md). For publish,
bind `streams_sns` to
`snsReceiver("us-east-1", session, data)`. Seal an AWS SigV4
session whose IAM policy permits `sns:Publish` only on the intended
standard topic in that region. Use the same
[mount's `data` label](https://docs.bijection.com/integrations/native-connectors#installer-bound-labels)
for the mount and its receivers.

Call `sns.publish({ command, topic, message })` with a stable command ID and
up to 16 KiB of nonempty UTF-8 text. `sns.publishStatus({ command })` gives
the retained SNS MessageId when AWS acknowledges the request. The release
connector parser decodes the XML receipt. Repeating the exact command
recovers its disposition, and an ambiguous send stays unknown.

For subscription, configure a dedicated standard SQS queue in AWS, subscribe it
to the topic, and leave raw message delivery disabled. Restrict `sqs:SendMessage`
on the queue to the SNS service and exact source topic ARN. Install the
[SQS receiver](https://docs.bijection.com/integrations/native-sqs.md) at `streams_sqs` with receive and
delete permissions for that queue. Call `sns.initialize({ topic, queue })`
with the topic ARN and the queue URL. Assign that queue exclusively to this
feed, including within the Streams mount.

Each receive handles one notification, up to 36 KiB on the wire and
16 KiB for the UTF-8 SNS envelope. The app verifies the envelope's topic
against the installed topic and uses the SNS MessageId as the stable key.
The message is a labelled File. The exact SQS receipt becomes eligible to
delete only after the File commit. Invalid or oversized messages stay
unacknowledged. SQS owns redelivery, visibility and redrive. There is no
ordered application cursor, and queue deletions leave retained Files intact.

[SNS Publish API](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) ·
[SNS fanout to SQS](https://docs.aws.amazon.com/sns/latest/dg/sns-sqs-as-subscriber.html)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.