> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating a SNS Topic and Subscribing through Email

> Hands-on lab · 15m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/creating-a-sns-topic-and-subscribing-through-email" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## Overview

### Lab details

1. This lab walks you through creating an SNS Topic and subscribing to email notifications.
2. Duration: **15 Minutes**
3. AWS Region: **US East (N. Virginia) us-east-1**

### Introduction

AWS SNS (Simple Notification Service) is a fully managed messaging service provided by Amazon Web Services (AWS). It enables developers to send push notifications, SMS messages, and email messages to subscribers. SNS follows a publish-subscribe messaging pattern, where messages are sent to topics and then delivered to subscribers who have expressed interest in receiving messages from those topics.

Key features of AWS SNS include:

1. **Topic-based messaging:** SNS allows you to create topics, which act as communication channels for sending messages. Publishers send messages to topics, and subscribers receive messages from topics they have subscribed to.
2. **Multiple message protocols:** SNS supports multiple message protocols, including HTTP/HTTPS, email, SMS, SQS (Simple Queue Service), Lambda functions, mobile push notifications, and more. This flexibility allows you to choose the most appropriate protocol for delivering messages to your subscribers.

### Architecture diagram

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/001.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=298243d9d0faffbbd1a380ff97778daf" alt="" width="1370" height="500" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/001.png" />

### Task details

1. Sign into AWS Management Console.
2. Create an SNS Topic.
3. Subscribe to email notifications while creating SNS Topic.
4. Validation of the lab

### Launching the lab environment

1. To launch the lab environment, Click on the **Launch lab** button.
2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
3. Once the Lab is started, you will be provided with **IAM user name**, **Password**, **Access** **Key**, and **Secret** **Access** **Key**.

<Note>
  You can only start one lab at any given time
</Note>

## Lab guide

### Lab steps

#### Task 1: Sign in to AWS Management Console

1. Click on the **Open console** button, and you will get redirected to AWS Console in a new browser tab.
2. On the AWS sign-in page,

* Leave the Account ID as default. Never edit/remove the 12 digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
* Now copy your **User Name** and **Password** in the Lab Console to the **IAM Username and Password** in AWS Console and click on the **Sign in** button

3. Once Signed In to the AWS Management Console, Make the default AWS Region as **US East (N. Virginia) us-east-1.**

4. Select Maybe later in New AWS Console Home page pop-up.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/002.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=ee0d800e0e2ae49e25aed6292a8f604e" alt="" width="754" height="454" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/002.png" />

#### Task 2: Creating SNS Topic

1. Make sure you are in the **US East (N. Virginia) us-east-1**
2. Navigate to the **Services** menu and click on **Simple Notification Service (SNS)** under the **Application Integration** section.
3. Enter Topic name and click on **Next** Button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/003.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=5f31c47fa4f05da1dc1a39bc00e0fb19" alt="" width="1092" height="420" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/003.png" />

4. Under **Details**

* Type: Select **Standard**
* Name: Enter ***mysnstopic***
* Display name: ***mysnsnotification***

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/004.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=1328af61b158ac984497a97a47c4348d" alt="" width="2064" height="1120" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/004.png" />

4. Leave other options as default and click on **Create topic** button.

5. An SNS topic will be created.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/005.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=ad16bfb73e933c7fe0e52b649f7de13a" alt="" width="1112" height="203" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/005.png" />

* **Note :**  Ignore below error message.

#### #### Task 3: Subscribing to the Topic

1. Once the SNS Topic is created, click on your topic.
2. Click on **Create subscription** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/006.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=bd62b5508f148d5b872b21eb420537c3" alt="" width="1034" height="409" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/006.png" />

3. Under Details

* Protocol: Select **Email**
* Endpoint: Enter ***your \<Mail Id>***
* **Note:** Make sure you give a valid mail address as you will receive an SNS notification to this address.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/007.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=f377a73bcd381eebe816c03a6bf38ee7" alt="" width="996" height="620" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/007.png" />

4. Click on **Create Subscription**.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/008.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=3b937d24232595afe888930861d1a35e" alt="" width="770" height="74" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/008.png" />

5. You will receive an email in your mailbox from SNS, if its not in the inbox, please check in Spam folder.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/009.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=b5d3bfba3dda9af3f01b271bcd5ecc82" alt="" width="589" height="213" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/009.png" />

6. Click on **Confirm subscription**.
7. Your email address is now subscribed to SNS Topic ***mysnstopic**\_\_.*

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/010.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=41d57b54fd941e35aba0157c3beb7ad3" alt="" width="577" height="273" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/010.png" />

8. You can unsubscribe to the SNS Topic at any time.
9. We can use this to subscribe to S3 events, CloudWatch events and more.

> #### Do you know?
>
> AWS SNS simplifies the task of sending notifications to a large number of subscribers across multiple platforms and protocols, providing a flexible and scalable solution for building event-driven architectures and real-time messaging systems.

### Task 4: Validation Test

1. Once the lab steps are completed, please click on the **Check my work** button on the Right side panel.
2. This will validate the resources in the AWS account and displays whether you have completed this lab successfully or not.
3. Sample output :

   <img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-a-sns-topic-and-subscribing-through-email/011.gif?s=0e35fc26c7ebc6e893f2a7f6e9fef88d" alt="" width="999" height="429" data-path="images/labs/creating-a-sns-topic-and-subscribing-through-email/011.gif" />

### Completion and conclusion

1. You have successfully created an SNS Topic.
2. You have successfully subscribed to the topic and received an email notification.

### End lab

1. Sign out of the AWS Account.
2. You have successfully completed the lab.
3. Once you have completed the steps, click on **End lab** button in the IP Lab Portal.

## What gets checked

When you press **Check my work**, the platform verifies each of these:

* **Create an Amazon SNS Topic** — Check If SNS Topic created or not

## Related help

* [FAQs and Troubleshooting](/aws-cp/support/faqs-and-troubleshooting)
