Get List of AWS SNS Topic Subscriptions using CLI

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                                        ||
|+-----------------+---------------------------------------------------------------------------------------+|

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!