Subscription
Subscription to a topic will push messages to the subscriber's protocol whenever a new message is published. For subscription, we need to select the protocol and provide the endpoint of the protocol. So the endpoint-owner needs to confirm the subscription and then only SNS is able to deliver messages to the endpoint. Subscription confirmation is a URL which is received at endpoint-owner ends. This URL contains a token which will help SNS to subscribe the endpoint to a specific token and this token is valid for 3 days.
Let's see how we can subscribe to a topic using email protocol.
AWS Management Console
Go to the AWS SNS Management Console at https://console.aws.amazon.com/sns/v2/home and perform the following steps:
- Click on
Topics
in the navigation pane on the left. - Click on
aws-bootcamp ARN
, displayed on the topic listing screen:
![](https://static.packt-cdn.com/products/9781788294454/graphics/5f4ed299-65a9-4d0a-bc97-c74b09ddc1ac.png)
Figure 8.3: Topic details
- Click
Create subscription
:
![](https://static.packt-cdn.com/products/9781788294454/graphics/439d841a-0174-4c4c-9784-7d7ec65717ce.png)
Figure 8.4: Creating a subscription
Provide details as follows:
Topic ARN
: By default,Topic ARN
will...