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
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to AWS,
- Get the total size and number of objects of a AWS S3 bucket and folders
- How to Create AWS SNS Topic using AWS CLI
- Fix: Amazon Linux bash: sudo: command not found
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Create an AWS User using CLI2 Command at a specific Path
- Fix: Missing the following required SSO configuration values: sso_start_url, sso_region
- Fix: zsh: command not found: aws (Mac/macOS)
- Configure AWS Access ID and Secret Keys using CLI on Mac
- Quick way to setup AWS DynamoDB locally on macOS
- Most Essencial AWS CLI 2 S3 ls Command Options
- How to Check AWS SNS Permissions using CLI
- AWS CLI Change Default Output Format
- How to install AWS CLI on Ubuntu
- Quick way to install AWS CLI for macOS Terminal
- Install AWS CLI using Brew Command
- AWS CLI Command to Get a List of SNS Topics
- Get List of AWS SNS Topic Subscriptions using CLI
- How to Setup AWS Credentials using Visual Studio Code
- Installing AWS CLI Version 2 on macOS Sonoma using Terminal
- AW3 CLI command to get list of all region names
- AWS SNS CLI Command Publish Message Attributes
- Create an S3 bucket in a specific AWS region using CLI Command
- [Fix] zsh: command not found: awscli [Mac Terminal]
- Understanding AWS Calculator: DynamoDB on-demand capacity
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
More Posts:
- [Solved] Mic not working on iPhone 7 after iOS 14 upgrade - Apple
- Mac Auto Move Mouse Pointer Every X Seconds to Keep Screen Awake - MacOS
- How to Select All Text in Vim/Vi editor - vi
- Steps to Change the Default Admin Password in Jenkins - Linux
- Google Chrome Update failed (error: 12) - Chrome
- How to display Toast on Button Click : Android - Android
- How to Stop Screen Recording on Mac - MacOS
- How to upgrade pip/pip3 package installer for Python - PIP