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

-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap