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!
More Posts related to AWS,
- Create S3 bucket and upload files using AWS Toolkit for Visual Studio Code
- Get the total size and number of objects of a AWS S3 bucket and folders
- Create an S3 bucket in a specific AWS region using CLI Command
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Fix AWS CLI 2 SignatureDoesNotMatch Error - Signature we calculated does not match
- 573 List of reserved keywords in AWS DynamoDB
- Quick way to setup AWS DynamoDB locally on macOS
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
- Quick way to install AWS CLI for macOS Terminal
- Setting and Updating AWS CLI Configuration
- AWS S3 CLI BucketAlreadyExists when calling CreateBucket Error make_bucket failed
- How to install AWS Toolkit for Visual Studio Code
- Create S3 bucket using AWS CLI Command mb
- Fix: zsh: command not found: aws (Mac/macOS)
- How to install AWS CLI on Ubuntu
- Fix: Amazon Linux bash: sudo: command not found
- How to Setup AWS Credentials using Visual Studio Code
- AW3 CLI command to get list of all region names
- Most Essencial AWS CLI 2 S3 ls Command Options
- Install AWS CLI using Brew Command
More Posts:
- Error code 0xCAA82EE2: Something went wrong (request timed out) [Microsoft] - Microsoft
- 10 ways to Convert String to a Number in JavaScript - JavaScript
- How to install Google Chrome using Mac Terminal - Google
- Install Docker Desktop on M1/M2 Apple Silicon ARM Chip Mac - Docker
- Implementing Merge Sort Algorithm in Java Program - Java
- Capture cURL Request Output to a File - cURL
- How to change the default location of Mac Screenshot - MacOS
- Fix: Error: Could not find or load main class org.gradle.wrapper. GradleWrapperMain - Gradle