0
0
AWScloud~30 mins

SNS topics and subscriptions in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
SNS topics and subscriptions
📖 Scenario: You are setting up a simple notification system using AWS Simple Notification Service (SNS). You want to create a topic and subscribe an email endpoint to it so that notifications can be sent to that email.
🎯 Goal: Create an SNS topic named MyTopic and subscribe an email address user@example.com to this topic.
📋 What You'll Learn
Create an SNS topic named MyTopic
Create a subscription for the topic with protocol email
Use the endpoint user@example.com for the subscription
💡 Why This Matters
🌍 Real World
SNS topics and subscriptions are used to send notifications to users or systems automatically when events happen, such as alerts, updates, or messages.
💼 Career
Understanding how to configure SNS topics and subscriptions is essential for cloud engineers and developers to build event-driven and notification systems in AWS.
Progress0 / 4 steps
1
Create the SNS topic
Create an SNS topic resource named MyTopic using AWS CloudFormation syntax.
AWS
Need a hint?

Use AWS::SNS::Topic as the resource type and set TopicName to MyTopic.

2
Add the subscription configuration
Add a subscription property to the MyTopic resource with protocol email and endpoint user@example.com.
AWS
Need a hint?

The Subscription property is a list of subscription objects. Add one with Protocol and Endpoint.

3
Add a topic policy to allow publishing
Add a TopicPolicy resource that allows anyone to publish messages to the MyTopic SNS topic.
AWS
Need a hint?

Use AWS::SNS::TopicPolicy resource type and attach the policy to MyTopic.

4
Add Outputs for the topic ARN
Add an Outputs section with an output named TopicArn that exports the ARN of the MyTopic SNS topic.
AWS
Need a hint?

Outputs section should export the topic ARN using !Ref MyTopic.