[AWS] Lab - Create a SNS and subscribe it

In this hands-on exercise, you will learn how to send alerts via SNS by creating a topic, subscribing to a topic, and publishing an alert message to a topic.

  1. Prerequisites: AWS Account
  2. By the end of this lab, you will be able to:
    • Create a topic
    • Subscribe to a topic
    • Publish a message to a topic

Follow the exercise instructions described below:

Step 1. Create a Topic

  • From the AWS Management Console page, select the SNS service.
  • On the left-hand navigation pane, click on the Topics service, and start the Create topic wizard.
  • In the Details section, enter a topic name of your choice
  • In the Access policy – optional section, use the following configuration to create the topic:
ConfigurationValue
Policy method Basic
Define who can publish messages to the topic Everyone
Define who can subscribe to this topic Everyone

 

 

  • Finish the Create topic. The topic details will display, or you can select the newly created topic from the Topics dashboard to create a subscription next.

Step 2. Subscribe to a Topic

  • While you are viewing the details of the newly created topic, start the Create subscription wizard, and use the following details:
FieldValue
Protocol Email
Endpoint Enter your email that should receive the notifications

 

 

  • The subscription page will display, and the status will be Pending confirmation. You will receive an email from Amazon SNS to confirm the subscription. Confirm the subscription.
  • In your web browser, a subscription confirmation screen appears.

Step 3. Publish Message to a Topic

  • Go back to the Topics service.
  • Select the topic you created earlier and Publish a message with the following details:
SectionFieldValue
Message details Subject Wishes
Message body Message body
to send to the endpoint
Congratulations on your
Udacity Nanodegree Graduation!
Message attributes Type, Name, Value StringOccasionGraduation

 

 

posted @ 2021-03-17 21:43  Zhentiw  阅读(63)  评论(0编辑  收藏  举报