How do I confirm the delivery status of Amazon Simple Notification Service (Amazon SNS) push notifications, and how do I determine why some notifications fail?

When you enable Amazon SNS delivery status logging for your platform application, your push notification transactions are logged with Amazon CloudWatch Logs, including both successful and failed deliveries.

Turn on delivery status logging

  1. Open the Amazon SNS console.
  2. Open the left navigation menu, expand Mobile, and then choose Push notifications.
  3. Under Platform applications, select the platform application you want to enable delivery status for, and then choose Edit.
  4. Expand Delivery status logging – optional, and then choose Create new service role.
  5. Choose Create new roles. The AWS Identity and Access Management (IAM) console opens in a new tab or window.
  6. On the IAM console permission request page, choose Allow.
  7. Choose Save changes.

Note: You can also enable delivery status by using AWS SDKs and the AWS Command Line Interface (AWS CLI).

View delivery status logs

  1. Open the CloudWatch console.
  2. In the left navigation pane, choose Logs.
  3. Under Log Groups, find your application's delivery status logs.

Delivery status logs aren't available until messages are published to an endpoint. For push notifications, successful publication occurs when Amazon SNS hands off the message to the provider. However, that hand off does not guarantee that the notification was delivered to the device.

Depending on the application type, you might see two log groups—one for successful notifications, and one for failed notifications. Logs for Firebase Cloud Messaging (FCM) and Apple Push Notification service (APNs) are in log groups named like this example:

sns/us-east-1/123456789012/app/platform_name/application_name/

"Failure" is appended to a log entry if delivery is unsuccessful. For example:

sns/us-east-1/123456789012/app/platform_name/application_name/Failure

Some log details include the messageId, statusCode, time taken (dwellTimeMs), destination endpoint (destination), and providerResponse. For example logs, see Amazon SNS Message Delivery Status CloudWatch Log Examples.

Troubleshoot notification failures

Look up the statusCode with the provider service, such as FCM or APNs. For the provider's exact response message, view the providerResponse.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-08-24

Updated: 2019-03-19