Simple Notification Service Flashcards
Amazon SNS
managed notification service. works on a push mechanism.
SNS topic
acts as an access point in between the publisher and subscriber applications. Topic policy controls who can publish message and subscribe to a topic.
Amazon SNS Fanout
SQS queues act as a subscriber. a publisher sends a message to a SNS topic, and SNS topic distributes it to many SQS queues in parallel.
Key Concept of access policy
Permission; Statement; Policy; Issuer; principal; Action; Resource; Conditions and keys; Requester; Evaluation; Effect; Default deny; allow; explicit deny;
SNS Best Practices
recommended to configure alerts on various SNS standard metrics to observe performance parameters such as success rates, failure rates, deliveries to SQS, and so on.
access policy to control who can publish to and receive from a SNS topic.
ensure all of subscription deleted first before delete a topic.
Use SNS and SQS to build loosely coupled application or a server less architecture.
Publishers
creates a topic and controls access to it. Policies determine which topics publishers can write to.
Message Data
Json key-value pair; posts to https/s endpoints with specific headers; allow developers to parse; message; messageId; signature; signatureVersion; SigningCertURL; Subject; Timestamp; TopicArn; Type; UnsubscribeURL;
Message Attributes
Name; Type; Value and Messagebody can not be empty or null.
§ Can send structured metadata along with messages
§ Allows override default denies
§ Explicit denies override allows
§ Order of policies does not matter
Mobile Push Notifications
provides the ability to send notifications directly to apps on mobile devices like message alerts, Badge updates, Sound alerts.
Services includes: ADM(Amazon Device Messagging);
APNS(Apple); Baidu Cloud Push; Google CLoud Messaging for Android; Microsoft Push Norification Service for Windows Phone; Windows Push Notification Services;
GCM use registrationID.
SNS Push Notifications Setup Process
SNS needs a device token in order to send notifications to mobile endpoints;
There are device tokens and registration IDs, depending on the mobile platform;
1.request credentials from mobile platforms(ADM, APNS, etc..)
2. request a token from mobile platforms;
3. create a platform application object;
4. create a platform endpoint object;
5. publish a message to the mobile endpoint;
Platform Specific Payloads
can send Push notifications at the same time to all apps/devices. send different messages depending on the platform.
A core benefit of using a SQS subscription endpoint with Amazon SNS
SNS Messages can be delivered to applications that require immediate notification of an event and messages are also persistent in an Amazon SQS queue for other applications to process later in time.
endpoints list
The US East (Northern Virginia) end-point is: http://sns.us-east-1.amazonaws.com
The US West (Oregon) end-point is: http://sns.us-west-2.amazonaws.com
The US West (Northern California) end-point is: http://sns.us-west-1.amazonaws.com
The EU(Ireland) end-point is: http://sns.eu-west-1.amazonaws.com
The EU(Frankfurt) end-point is: http://sns.eu-central-1.amazonaws.com
The Asia Pacific (Singapore) end-point is: http://sns.ap-southeast-1.amazonaws.com
The Asia Pacific (Tokyo) end-point is: http://sns.ap-northeast-1.amazonaws.com
The Asia Pacific (Sydney) end-point is: http://sns.ap-southeast-2.amazonaws.com
The South America (Sao Paulo) end-point is: http://sns.sa-east-1.amazonaws.com
time period available for confirmation when subscribing
3 days