How to Send or Publish SNS Message using AWS CLI

We can make use of the aws sns publish command on the AWS CLI to send a message to an AWS SNS topic.


% aws sns publish 
 --topic-arn arn:aws:sns:us-east-1:107xx89xx9xx:smsTopic 
 --message "Learning AWS SNS"

|                       Publish                       |
|  MessageId|  141997xx-8c80-5bxx-8ff3-cacxx6xx7508   |
Publishing to AWS SNS Topic Example

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:

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