Amazon Simple Notification Service (SNS) | Transports Flashcards
How soon can customers recreate topics with previously used topic names?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
Topic names should typically be available for reuse approximately 30-60 seconds after the previous topic with the same name has been deleted. The exact time will depend on the number of subscriptions which were active on the topic – topics with a few subscribers will be available instantly for reuse, topics with larger subscriber lists may take longer.
How would a user subscribe for notifications to be delivered over email?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
To receive email notifications for a particular topic, a subscriber should specify “Email” or “Email-JSON” as the protocol and provide a valid email address as the end-point. This can be done using the AWS Management Console or by calling the Amazon SNS API directly. Amazon SNS will then send an email with a confirmation link to the specified email address, and require the user monitoring the email address to explicitly opt-in for receiving email notifications from that particular topic. Once the user confirms the subscription by clicking the provided link, all messages published to the topic will be delivered to that email address.
Why does Amazon SNS provide two different transports to receive notifications over email?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
The two email transports are provided for two distinct types of customers/end-users. “Email-JSON” sends notifications as a JSON object, and is meant for applications to programmatically process emails. The “Email” transport is meant for end-users/consumers and notifications are regular, text-based messages which are easily readable.
Can a user change the Subject and Display name for notifications sent over Email/Email-JSON?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
Amazon SNS allows users to specify the Subject field for emails as a parameter passed in to the Publish API call and can be different for every message published. The Display name for topics can be set using the SetTopicAttributes API – this name applies to all emails sent from this topic.
Do subscribers need to specifically configure their email settings to receive notifications from Amazon SNS?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
In most cases, users should be able to receive subscription confirmations and notifications from Amazon SNS without doing anything specific. However, there could be cases where the email provider’s default settings or other user-specific configurations mistakenly redirect the emails to the junk/spam folder. To ensure that users see confirmation messages and notifications sent from Amazon SNS, users can add “no-reply@sns.amazonaws.com” to their contact lists and check their junk/spam folders for messages from Amazon SNS.
In the case of passing in an SQS queue as an endpoint, will users need to create the queue prior to subscribing? What permissions will the queue require?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
Using the SQS console, users should create the SQS queue prior to subscribing it to a Topic. Select this queue on the console, and from the ‘Queue Actions’ in the menu bar, select ‘Subscribe Queue to SNS Topic’ from the drop-down list. In the subscribe dialog box, select the topic from the ‘Choose a Topic’ drop-down list, and click the ‘Subscribe’ button. For complete step-by-step instructions, please refer to the Amazon SNS documentation.
Are Amazon SQS FIFO queues compatible with Amazon Simple Notification Service (SNS)?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
Amazon SNS does not currently support forwarding messages to Amazon SQS FIFO queues. You can use SNS to forward messages to standard queues.
How would a developer setup an Amazon SQS queue to receive Amazon SNS notifications?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
To have Amazon SNS deliver notifications to an SQS queue, a developer should subscribe to a topic specifying “SQS” as the transport and a valid SQS standard queue as the end-point. In order to allow the SQS queue to receive notifications from Amazon SNS, the SQS queue owner must subscribe the SQS queue to the Topic for Amazon SNS to successfully deliver messages to the queue.
If the user owns both the Amazon SNS topic being subscribed to and the SQS queue receiving the notifications, nothing further is required. Any message published to the topic will automatically be delivered to the specified SQS queue. If the user owning the SQS queue is not the owner of the topic, Amazon SNS will require an explicit confirmation to the subscription request.
Please refer to the Amazon SNS documentation for further details on subscribing an SQS queue to a topic and setting access control policies for SQS queues.
How can I fanout identical messages to multiple SQS queues?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
Create an SNS topic first using SNS. Then create and subscribe multiple SQS standard queues to the SNS topic. Now whenever a message is sent to the SNS topic, the message will be fanned out to the SQS queues, i.e. SNS will deliver the message to all the SQS queues that are subscribed to the topic.
What is the format of structured notification messages sent by Amazon SNS?
Transports
Amazon Simple Notification Service (SNS) | Application Integration
The notification message sent by Amazon SNS for deliveries over HTTP, HTTPS, Email-JSON and SQS transport protocols will consist of a simple JSON object, which will include the following information:
MessageId: A Universally Unique Identifier, unique for each notification published.
Timestamp: The time (in GMT) at which the notification was published.
TopicArn: The topic to which this message was published
Type: The type of the delivery message, set to “Notification” for notification deliveries.
UnsubscribeURL: A link to unsubscribe the end-point from this topic, and prevent receiving any further notifications.
Message: The payload (body) of the message, as received from the publisher.
Subject: The Subject field – if one was included as an optional parameter to the publish API call along with the message.
Signature: Base64-encoded “SHA1withRSA” signature of the Message, MessageId, Subject (if present), Type, Timestamp, and Topic values.
SignatureVersion: Version of the Amazon SNS signature used.
Notification messages sent over the “Email” transport only contain the payload (message body) as received from the publisher.