If you want to delete an AWS SNS Topic via AWS CLI - Command Line Interface, you can make use of the below steps.
Step 1: Get the List of all SNS Topics
% aws sns list-topics
-----------------------------------------------------
| ListTopics |
+---------------------------------------------------+
|| Topics ||
|+-------------------------------------------------+|
|| TopicArn ||
|+-------------------------------------------------+|
|| arn:aws:sns:us-east-1:5xx2xx665xx1:emailTopic ||
|| arn:aws:sns:us-east-1:5xx2xx665xx1:smsTopic ||
|+-------------------------------------------------+|
Step 2: Unsubscribe Subscriptions if Any
% aws sns unsubscribe --subscription-arn arn:aws:sns:us-east-1:5xx2xx665xx1:smsTopic:e25591a4-xx-xx-xx-xx
Step 3: Delete SNS Topic
% aws sns delete-topic --topic-arn arn:aws:sns:us-east-1:5xx2xx665xx1:smsTopic

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!