Creating an SNS Topic and a Subscription
Amazon Simple Notification Service (SNS) is a highly-scalable, reliable, secure, and fully-managed service that enables applications and third-party services to communicate with each other.
In this lab step, you will create a topic in SNS and create an email subscription. An email address you can receive emails at is required to complete this step.
1. In the AWS Management Console search bar, enter SNS, and click the Simple Notification Service result under Services:
Note: Please ensure that you are in the US West (Oregon) us-west-2 region before proceeding. You can see your current region in the top-right. Using a different region will result in the checks at the end of this lab step failing.
2. To open the left-hand menu, click the hamburger icon:
If the menu is already visible, proceed to the next instruction.
3. In the left-hand side menu, click Topics:
4. Click Create topic:
The Create topic form will open.
5. In the Create topic form, under Details, in the Name textbox, enter lab-topic:
A topic in SNS is a communication channel that many services or applications can send and receive messages through.
6. Make sure to select the Standard type:
6. To create your topic, click Create topic:
Your browser will load a page showing details of your topic and you will see a notification:
7. In the Subscriptions section, click Create subscription:
8. In the Create subscription form, under Details, select the following values:
- Topic ARN: value ending with -lab-topic
- Protocol: Email
ARN is an acronym for Amazon Resource Name, an ARN is used to uniquely identify a resource in AWS.
9. In the Endpoint field, enter your email address:
AWS will send a subscription confirmation email to this email address and you will receive emails about CodeCommit events in later lab steps.
10. Click Create subscription:
Your browser will load a page detailing your subscription and you will see a notification:
Creating a subscription in SNS connects a topic to an endpoint, in this case, the endpoint is your email address and you will receive emails when a message is published to the topic.
Possible types of endpoint you can subscribe to a topic include:
- HTTPS web URL
- Lambda function
- Mobile phone
12. Check your email for the Subscription Confirmation email and click the Confirm subscription link inside it.
The email you receive will look similar to this:
The email usually takes a minute or two to arrive, it may take up to five minutes.
If you don't see your email please check your spam folder.
13. Use your browser to refresh the page in the AWS Management Console.
You will see the status of the subscription has changed from Pending to Confirmed:
In this lab step, you created a topic in SNS and subscribed to the topic using your email address as the endpoint to receive notifications at.
Check that the SNS topic has been created
Check if the SNS Topic has a confirmed subscription