Compare SNS topics across accounts and endpoints
Same topics, another account and another address.

The recording shows kurkik sns diff on the demo sandbox; its data differs from this example.
Command
Section titled “Command”kurkik sns diff topics-staging topics-prod --consumersOutput
Section titled “Output”topics-staging vs topics-prodAmazon SNS topics-prod
Notes - Topics-staging is account 300000001901 and topics-prod is account 300000001902; ARNs are compared by the name they end in.
Drift: 0 changed · 0 unmanaged · 0 missing (no drift) — 5 matchedExit code 0: no drift.
| Mark | Means |
|---|---|
~ |
both sides have it, but it differs |
! |
only the first side has it |
+ |
only the second side has it |
Other ways to give a side
Section titled “Other ways to give a side”A document and a connection (exit 2)
$ kurkik sns diff staging.yaml topics-prod --consumersstaging.yaml vs topics-prodAsyncAPI 3.0.0 · Amazon SNS topics-prod (us-east-1)
Servers ! sns host — Amazon SNS was read at 127.0.0.1:14566, not at localhost:14566. (document: localhost:14566, broker: 127.0.0.1:14566)
Subscriptions ! orders subscription — Subscription sqs:arn:aws:sqs:us-east-1:300000001901:orders-queue does not exist. (document: sqs:arn:aws:sqs:us-east-1:300000001901:orders-queue) + orders subscription — Subscription sqs:arn:aws:sqs:us-east-1:300000001902:orders-queue exists but is not declared by the document. (broker: sqs:arn:aws:sqs:us-east-1:300000001902:orders-queue)
Drift: 0 changed · 1 unmanaged · 2 missing (drift) — 2 matchedTwo documents (exit 0)
$ kurkik sns diff staging.yaml prod.yaml --consumersstaging.yaml vs prod.yamlAsyncAPI 3.0.0
Servers - sns host — Server 'sns' (localhost:14566) has no counterpart in prod.yaml. (staging.yaml: localhost:14566) - sns host — Server 'sns' (127.0.0.1:14566) has no counterpart in staging.yaml. (prod.yaml: 127.0.0.1:14566)
Drift: 0 changed · 0 unmanaged · 0 missing (no drift) — 3 matched · 2 not verifiableDownload the JSON report (-o json)
The documents compared
Section titled “The documents compared”staging.yaml
asyncapi: 3.0.0info: title: topics-staging Amazon SNS API version: 1.0.0-SNAPSHOT description: Generated by reading Amazon SNS of topics-staging (us-east-1).servers: sns: host: localhost:14566 protocol: amazon-sns description: Amazon SNS in us-east-1.channels: orders: address: orders bindings: sns: bindingVersion: 0.1.0 name: orders ordering: type: standard payments: address: payments bindings: sns: bindingVersion: 0.1.0 name: payments ordering: type: standardoperations: receive_from_orders: action: receive channel: $ref: "#/channels/orders" description: Subscriptions of orders when this document was generated. bindings: sns: bindingVersion: 0.1.0 consumers: - protocol: sqs endpoint: arn: arn:aws:sqs:us-east-1:300000001901:orders-queue rawMessageDelivery: trueprod.yaml
asyncapi: 3.0.0info: title: topics-prod Amazon SNS API version: 1.0.0-SNAPSHOT description: Generated by reading Amazon SNS of topics-prod (us-east-1).servers: sns: host: 127.0.0.1:14566 protocol: amazon-sns description: Amazon SNS in us-east-1.channels: orders: address: orders bindings: sns: bindingVersion: 0.1.0 name: orders ordering: type: standard payments: address: payments bindings: sns: bindingVersion: 0.1.0 name: payments ordering: type: standardoperations: receive_from_orders: action: receive channel: $ref: "#/channels/orders" description: Subscriptions of orders when this document was generated. bindings: sns: bindingVersion: 0.1.0 consumers: - protocol: sqs endpoint: arn: arn:aws:sqs:us-east-1:300000001902:orders-queue rawMessageDelivery: trueHow to build this setup yourself
topics-staging
awslocal sqs create-queue --queue-name orders-queueawslocal sqs create-queue --queue-name orders-dlqawslocal sns create-topic --name ordersawslocal sns subscribe --topic-arn arn:aws:sns:us-east-1:300000001901:orders --protocol sqs --notification-endpoint arn:aws:sqs:us-east-1:300000001901:orders-queue --return-subscription-arnawslocal sns set-subscription-attributes --subscription-arn arn:aws:sns:us-east-1:300000001901:orders:958cc469-8f78-4c7a-aad1-12055e94a9d6 --attribute-name RawMessageDelivery --attribute-value trueawslocal sns create-topic --name paymentstopics-prod
awslocal sqs create-queue --queue-name orders-queueawslocal sqs create-queue --queue-name orders-dlqawslocal sns create-topic --name ordersawslocal sns subscribe --topic-arn arn:aws:sns:us-east-1:300000001902:orders --protocol sqs --notification-endpoint arn:aws:sqs:us-east-1:300000001902:orders-queue --return-subscription-arnawslocal sns set-subscription-attributes --subscription-arn arn:aws:sns:us-east-1:300000001902:orders:eb2f84cf-994e-4758-8084-eea6f085fda5 --attribute-name RawMessageDelivery --attribute-value trueawslocal sns create-topic --name paymentsAll flags: kurkik sns diff · more Amazon SNS diff examples
Copyright © 2026 Pavel Bodiachevskii