In order to retrieve the list of all the subscriptions for an AWS SNS Topic via CLI you can make use of the aws sns list-subscriptions-by-topic command.
Syntax:
aws sns list-subscriptions-by-topic --topic-arn <topic-arn>
Example:
aws sns list-subscriptions-by-topic --topic-arn arn:aws:sns:us-east-1:5762xx665xx1:smslTopic
-------------------------------------------------------------------------------------------------------------
| ListSubscriptionsByTopic |
+-----------------------------------------------------------------------------------------------------------+
|| Subscriptions ||
|+-----------------+---------------------------------------------------------------------------------------+|
|| Endpoint | +1xx-xx-xx-xx ||
|| Owner | 5762xx665xx1 ||
|| Protocol | sms ||
|| SubscriptionArn| arn:aws:sns:us-east-1:5762xx665xx1:emailTopic:eeb4f499-exx2-xxba-aexx-3915c1134254 ||
|| TopicArn | arn:aws:sns:us-east-1:5762xx665xx1:emailTopic ||
|+-----------------+---------------------------------------------------------------------------------------+|
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!