Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Tuesday, April 22, 2014

AWS SNS, SMS and mobile push

Three methods to send messages to mobile devices:
2. SNS mobile push with topics: http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-topicmobile.html
3. SNS with SMS: http://docs.aws.amazon.com/sns/latest/dg/SMSMessages.html

More details here on all three methods to send messages to phones using SNS here: http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html

 Here are some things to be aware of:
·         AWS Region: Mobile push to Android, iOS and Kindle Fire devices works in all public AWS regions, but SMS is only available in US-East
·         Recipient location: Mobile push recipients can be anywhere in the world so long as they have IP connectivity.  But SNS currently only supports US numbers.
·         Topic versus Direct mobile push: Mobile push notifications can be directly addressed to a single endpoint, but SMS currently must be delivered through a topic.

Wednesday, December 4, 2013

SNS SMS notifications

SNS SMS can only be sent from the US-East region at this time.  Sending SMS messages to notify an Oracle DBA regarding an Oracle databases alert is a great way to notify someone on call:

The steps to send a message are:
1. aws sns create-topic --name SMSNotifications --DisplayName SMSAWS

The ARN you need to use to use in the subscribe and publish commands will be displayed:
{
    "TopicArn": "arn:aws:sns:us-east-1:649163059618:SMSNotifications"
}

2. aws sns subscribe --topic-arn arn:aws:sns:us-east-1:649163059618:SMSNotifications --protocol sms --notification-endpoint 16035029999


3. aws sns publish --topic-arn arn:aws:sns:us-east-1:649163059618:SendSMS --message "Hello World from CLI"

Thursday, July 18, 2013

SQS message retention and visibility

There are two important attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Query_QuerySetQueueAttributes.html)  set when working with AWS SQS.  The first is the MessageRetentionPeriod and the other is the VisibilityTimeout.  These are two very different and distinct attributes.  The MessageRetentionPeriod is the length of time (in seconds) the message will stay in the queue (unless it is deleted).  The value can be 60 (1 minute) to 1209600 (14 days).  The VisibilityTimeout is the length of time no other applications can NOT see the message while an application is processing the message.  This can be set to be 0 to 43200 (12 hours). The longer the time this is set the longer you expect one process to be working on this message.

SQS automatically deletes messages that have been in a queue for more than maximum message retention period. The default message retention period is 4 days. However, you can set the message retention period to a value from 60 seconds to 1209600 seconds (14 days) with SetQueueAttributes

More on why messages are not deleted once read and the visibility of a message while it is being processed by an application:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html