How to Create AWS SNS Topic using AWS CLI


If you want to create an AWS SNS (Simple Notification Service) Topic using the Command Line Interface - AWS CLI, you can make use of the aws sns create-topic command as follows,


Example:
% aws sns create-topic --name smsTopic     


-------------------------------------------------------------
|                        CreateTopic                        |
+----------+------------------------------------------------+
|  TopicArn|  arn:aws:sns:us-east-1:10xx189xx9xx:smsTopic   |
+----------+------------------------------------------------+

As you can see the SNS topic has been created.

AWS SNS Topic as seen in AWS Console

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

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