Transcription of Notification Service Amazon Simple - AWS …
1 Amazon SimpleNotification ServiceDeveloper GuideAPI Version 2010-03-31 Amazon Simple Notification Service Developer GuideAmazon Simple Notification Service : Developer GuideCopyright 2019 Amazon Web services , Inc. and/or its affiliates. All rights 's trademarks and trade dress may not be used in connection with any product or Service that is not Amazon 's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon . All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored Simple Notification Service Developer GuideTable of ContentsWhat is Amazon SNS? .. 1 Are You a First-Time Amazon Simple Notification Service User?
2 2 Beyond the Getting Started Section .. 2 Accessing Amazon SNS .. 2 Getting Started .. 4 Before You Begin .. 4 Create a Topic .. 5 Subscribe to a Topic .. 5 Publish to a Topic .. 6 Create Different Messages for Each Protocol .. 7 Clean 8 Using the AWS SDK for Java .. 9 Using the AWS SDK for .NET .. 10 How Amazon SNS Works .. 13 Common Scenarios .. 13 Fanout .. 13 Application and System Alerts .. 13 Push Email and Text Messaging .. 14 Mobile Push 14 Message Durability .. 14 Message Delivery Status .. 14 Configuring Message Delivery Status Attributes with the AWS Management Console .. 15 Configuring Message Delivery Status Attributes for Topics Subscribed to Amazon SNSE ndpoints with the AWS SDKs.
3 15 Message Attributes .. 17 Message Attribute Items and Validation .. 17 Data Types .. 18 Reserved Message Attributes for Mobile Push Notifications .. 18 Applying Message Attributes .. 19 Message 24 Subscription Filter Policies .. 28 Removing .. 31 Example: Filter Policy as a Java Collection .. 33 Message and JSON Formats .. 35 HTTP/HTTPS Headers .. 36 HTTP/HTTPS Subscription Confirmation JSON Format .. 36 HTTP/HTTPS Notification JSON Format .. 38 HTTP/HTTPS Unsubscribe Confirmation JSON Format .. 39 SetSubscriptionAttributes Delivery Policy JSON Format .. 40 SetTopicAttributes Delivery Policy JSON Format .. 41 Large Payload and Raw Message Delivery .. 42 Enabling Raw Message Delivery with the AWS Management Console.
4 42 System-to-System Messaging .. 43 With AWS Lambda Function as Subscriber .. 43 Prerequisites .. 43 Configuring Amazon SNS with Lambda Endpoints with the AWS Management Console .. 43 With Amazon SQS Queue as Subscriber .. 44 Step 1: Get the ARN of the Queue and Topic .. 45 Step 2: Give Permission to the Amazon SNS Topic to Send Messages to the Amazon SQS Queue .. 46 Step 3: Subscribe the Queue to the Amazon SNS Topic .. 46 Step 4: Give Users Permissions to the Appropriate Topic and Queue Actions .. 47 Step 5: Test the Topic's Queue Subscriptions .. 49 Sending Messages to a Queue in a Different Account .. 50 API Version 2010-03-31iiiAmazon Simple Notification Service Developer GuideUsing an AWS CloudFormation Template to Create a Topic that Sends Messages to AmazonSQS Queues.
5 53 With HTTP/S endpoint as Subscriber .. 57 Step 1: Make Sure Your endpoint is Ready to Process Amazon SNS Messages .. 58 Step 2: Subscribe the HTTP/HTTPS endpoint to the Amazon SNS topic .. 61 Step 3: Confirm the 61 Step 4: Set the delivery retry policy for the subscription (optional) .. 62 Step 5: Give users permissions to publish to the topic (optional) .. 62 Step 6: Send messages to the HTTP/HTTPS endpoint .. 63 Setting Amazon SNS Delivery Retry Policies for HTTP/HTTPS Endpoints .. 63 Certificate Authorities for HTTPS Endpoints .. 69 Verifying Message Signatures .. 81 Example Code for an endpoint Java Servlet .. 83 User 87 With Mobile Application as Subscriber (Mobile Push).. 87 Overview .. 87 Prerequisites.
6 88 Mobile Push High Level Steps .. 89 Getting Started with 90 Getting Started with APNS .. 94 Getting Started with Baidu .. 100 Getting Started with 116 Getting Started with MPNS .. 120 Getting Started with WNS .. 123 Using Amazon SNS Mobile Push .. 126 Application Attributes for Message Delivery Status .. 139 Application Event Notifications .. 142 Amazon SNS TTL .. 144 Amazon SNS Mobile Push APIs .. 146 API Errors .. 147 With Mobile Phone Number as Subscriber (Send SMS).. 153 Setting Preferences .. 154 Sending a 157 Sending a Message to Multiple Phone 161 Monitoring SMS Activity .. 167 Managing 172 Reserving a Short Code .. 177 Supported Regions and Countries .. 178 Monitoring and 186 Monitoring Topics Using CloudWatch.
7 186 Access CloudWatch Metrics for Amazon SNS .. 186 Set CloudWatch Alarms for Amazon SNS Metrics .. 187 Amazon SNS Metrics .. 188 Dimensions for Amazon Simple Notification Service Metrics .. 190 Logging API Calls Using CloudTrail .. 191 Amazon SNS Information in CloudTrail .. 191 Example: Amazon SNS Log File Entries .. 192 Security .. 195 Authentication and Access Control .. 195 Overview of Managing Access .. 195 Special Information for Amazon SNS Policies .. 209 Controlling User Access to Your AWS Account .. 210 Server-Side Encryption .. 216 Encryption Scope .. 217 Key Terms .. 217 Estimating AWS KMS Costs .. 218 Configuring AWS KMS Permissions .. 219 API Version 2010-03-31ivAmazon Simple Notification Service Developer GuideErrors.
8 221 Tutorial: Enabling SSE for a Topic .. 222 Tutorial: Enabling SSE for a Topic with an Encrypted Queue Subscribed .. 224 VPC 226 Tutorial: Publishing Messages Privately from a VPC .. 226 Tutorial: Creating a VPC endpoint .. 236 Document History .. 238 AWS Glossary .. 247 API Version 2010-03-31vAmazon Simple Notification Service Developer GuideWhat is Amazon Simple NotificationService? Amazon Simple Notification Service ( Amazon SNS) is a web Service that coordinates and manages thedelivery or sending of messages to subscribing endpoints or clients. In Amazon SNS, there are twotypes of clients publishers and subscribers also referred to as producers and consumers. Publisherscommunicate asynchronously with subscribers by producing and sending a message to a topic, which is alogical access point and communication channel.
9 Subscribers ( , web servers, email addresses, AmazonSQS queues, AWS Lambda functions) consume or receive the message or notification over one of thesupported protocols ( , Amazon SQS, HTTP/S, email, SMS, Lambda) when they are subscribed to using Amazon SNS, you (as the owner) create a topic and control access to it by defining policiesthat determine which publishers and subscribers can communicate with the topic. A publisher sendsmessages to topics that they have created or to topics they have permission to publish to. Instead ofincluding a specific destination address in each message, a publisher sends a message to the SNS matches the topic to a list of subscribers who have subscribed to that topic, and deliversthe message to each of those subscribers.
10 Each topic has a unique name that identifies the Amazon SNSendpoint for publishers to post messages and subscribers to register for notifications. Subscribers receiveall messages published to the topics to which they subscribe, and all subscribers to a topic receive thesame Are You a First-Time Amazon Simple Notification Service User? (p. 2) Beyond the Getting Started Section (p. 2) Accessing Amazon SNS (p. 2)API Version 2010-03-311 Amazon Simple Notification Service Developer GuideAre You a First-Time AmazonSimple Notification Service User?Are You a First-Time Amazon Simple NotificationService User?If you are a first-time user of Amazon SNS, we recommend that you begin by reading the Getting Startedwith Amazon Simple Notification Service (p.)