AWS CLI with Amazon SNS

AWS CLI with Amazon SNS

We will get acquainted with CLI via SNS service.

  1. To create an SNS topic, we do the following:
aws sns create-topic --name aws-cli

AWS CLI

  1. After successfully creating the SNS topic, we will subscribe
 aws sns subscribe --topic-arn **ARN Topic** --protocol email --notification-endpoint aws@example.com

AWS CLI

  1. Check the mail we used in the previous command. Then select Confirm subscription.

AWS CLI

  1. Complete subscription

AWS CLI

  1. After the subscriber, we try to push the message to check.
 aws sns publish --topic-arn **ARN Topic** --message "Hello"

AWS CLI

  1. We will receive a message by mail.

AWS CLI