Notes from video series . What is it? S imple N otification S ervice Message publishing and processing service (Pub/Sub) Old service from AWS Messages are published to a topic and this topic delivers identical message to a different subscribers of that topic Allows fanout to millions of consumers (Email, HTTP Endpoint, SQS, Texting) Messages are JSON objects Contrary to SQS, in SNS we publish messages to a topic and can have multiple subscribers to that topic, not just one Message is deleted after it is delivered to all subscribers SNS usually do not interact with subscribers directly, because a subscriber may have a problem and message will be undelivered and have to stay in SNS Instead SNS sends messages to a dedicated SQS queue owned by subscribers (common approach) Fully managed and durable with automatic scaling As a subscribers we can have an application (AWS Lambda, NodeJs app, SQS queue) or a person (for ex. phone) Create topic Go to AWS SNS and login Click on create topic Give a name to a topic, for ex. 'TopicDemo' Define who can publish and subscribe to the topic by setting the access policy . You can allow only yourself or specific aws accounts or everyone to publish messages into the topic. Btw, your account number is shown under your user name in the right top corner when you click on it With delivery retry policy we can set the number of retries if message delivery fails Delivery status logging allows to see logs in CloudWatch if message has been delivered. This may affect on price. Added AWS Lambda & Amazon SQS protocols. Also created default IAM roles. arn:aws:iam::360117275238:role/SNSSuccessFeedback + arn:aws:iam::360117275238:role/SNSFailureFeedback At Topics menu we now can see our Topic with arn:aws:sns:us-east-1:360117275238:TopicDemo Set subscription You can Create subscription from the menu But easier to go to your Topic and create subscription from inside Topic ARN is already pre-populated Choose endpoint you want to subscribe, for ex. AWS Lambda By default all topic subscribers get the message, until subscription filter policy is enabled. Message will be accepted only if it contains attributes that match specified in the filter policy. Need to assign attributes also at message publishing. Great way to reduce expenses. At d ead- l etter q ueue we can configure a queue where undelivered messages are dropped. If we do not enable DLQ, SNS will retry to deliver a message for 48h and then message is gone. Send a topic Can send a topic right from the console with Publish message button or programmatically knowing its ARN and using AWS SNS SDK Do it from console Put the JSON message Can also ass message attributes for filtering purposes Connect SNS to Lambda