Find SNS topics missing between environments
Each side has a topic the other does not.

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
Channels ! refunds address — Topic refunds is not on topics-prod. (topics-staging: refunds) + shipments address — Topic shipments is not on topics-staging. (topics-prod: shipments)
Notes - Topics-staging is account 300000001201 and topics-prod is account 300000001202; ARNs are compared by the name they end in.
Drift: 0 changed · 1 unmanaged · 1 missing (drift) — 2 matchedExit code 2: drift found, so a CI job can stop here.
| 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)
Channels ! refunds address — Topic refunds does not exist. (document: refunds) + shipments address — Topic shipments exists but no channel in the document describes it. (broker: shipments)
Drift: 0 changed · 1 unmanaged · 1 missing (drift) — 2 matchedTwo documents (exit 2)
$ kurkik sns diff staging.yaml prod.yaml --consumersstaging.yaml vs prod.yamlAsyncAPI 3.0.0
Channels ! refunds address — refunds is in staging.yaml and not in prod.yaml. (staging.yaml: refunds) + shipments address — shipments is in prod.yaml and not in staging.yaml. (prod.yaml: shipments)
Drift: 0 changed · 1 unmanaged · 1 missing (drift) — 1 matchedDownload 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 refunds: address: refunds bindings: sns: bindingVersion: 0.1.0 name: refunds ordering: type: standardoperations: {}prod.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: 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 shipments: address: shipments bindings: sns: bindingVersion: 0.1.0 name: shipments ordering: type: standardoperations: {}How to build this setup yourself
topics-staging
awslocal sns create-topic --name ordersawslocal sns create-topic --name refundstopics-prod
awslocal sns create-topic --name ordersawslocal sns create-topic --name shipmentsAll flags: kurkik sns diff · more Amazon SNS diff examples
Copyright © 2026 Pavel Bodiachevskii