harish sharma harish sharma - 1 month ago 17
PHP Question

AWS SNS delivery status

I am new in Aws, I am using Aws SNS to send notification, i am sending notifications to different topic not to endpoint. This is working perfectly.

When i

publish
notification, i got array like

object(Aws\Result)#84 (1) {
["data":"Aws\Result":private]=>
array(2) {
["MessageId"]=>
string(36) "************-7a29-591f-8765-************"
["@metadata"]=>
array(4) {
["statusCode"]=>
int(200)
["effectiveUri"]=>
string(40) "https://sns.ap-southeast-1.amazonaws.com"
["headers"]=>
array(4) {
["x-amzn-requestid"]=>
string(36) "************-b737-5831-abf4-************"
["content-type"]=>
string(8) "text/xml"
["content-length"]=>
string(3) "294"
["date"]=>
string(29) "Fri, 28 Oct 2016 08:59:05 GMT"
}
["transferStats"]=>
array(1) {
["http"]=>
array(1) {
[0]=>
array(0) {}
}
}
}
}


I am using php at server side,
How can i get notification delivery status of all recepients by this
message id
?

Thanks in Anticipants.

Answer

You are asking how to obtain notification delivery status of messages sent via Amazon SNS.

The Using Amazon SNS Topic Attributes for Message Delivery Status documentation says:

Amazon SNS provides support to log the delivery status of notification messages sent to topics with the following Amazon SNS endpoints:

  • Application
  • HTTP
  • Lambda
  • SQS

After you configure the message delivery status attributes, log entries will be sent to CloudWatch Logs for messages sent to a topic subscribed to an Amazon SNS endpoint.

I could not find a specific API call to request status by message_id. Instead, it appears that the logging information is sent to CloudWatch Logs. You would need to parse the logs to discover the status.

Comments