AWS CLI Command to Get a List of SNS Topics

If you want to see the list of all the SNS topics that you have created under your AWS Account, you can do that using the aws cli command - aws sns list-topics

Let's take a look at an example.

% aws sns list-topics

-----------------------------------------------------
|                    ListTopics                     |
+---------------------------------------------------+
||                     Topics                      ||
|+-------------------------------------------------+|
||                    TopicArn                     ||
|+-------------------------------------------------+|
||  arn:aws:sns:us-east-1:10xx189xx953:apiTopic    ||
||  arn:aws:sns:us-east-1:107xx89xx953:emailTopic  ||
||  arn:aws:sns:us-east-1:107xx89xx953:smsTopic    ||
|+-------------------------------------------------+|

As you can see I have three topics created.

Display List of SNS Topics under AWS Account - AWS CLI Command

Related Article:

How to create SNS Topic via AWS CLI Command: https://code2care.org/howto/create-aws-sns-topic-using-aws-cli

Comments & Discussion

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