0
votes

On the FAQ of AWS SNS they have mentioned that:

With the exception of SMS messages, Amazon SNS messages can contain up to 256 KB of text data, including XML, JSON and unformatted text.

Q: How do SNS topics work with Mobile Push?

SNS topics can have subscribers from any supported push notifications platform, as well as any other endpoint type such as SMS or email. When you publish a notification to a topic, SNS will send identical copies of that message to each endpoint subscribed to the topic. If you use platform-specific payloads to define the exact payload sent to each push platform, the publish will fail if it exceeds the maximum payload size imposed by the relevant push notifications platform.

Q: What payload size is supported for various target platforms?

SNS will support maximum payload size that is supported by the underlying native platform. Customers can use a JSON object to send platform specific messages. See Using SNS Mobile Push API for additional details.

https://aws.amazon.com/sns/faqs/

My question is can I send 256KB payload using SNS to mobile devices if there are limits on the lengths of payload messages delivered through GCM and APN?

Can these notifications sent via SNS topic wake up the app if it's not already running?

1
The docs says so. I'm not sure what further clarification you're asking for.AL.
I have updated my question. Please check and answer if possible.Atharva

1 Answers

0
votes

As per the FAQ - Mobile push notifications :

SNS will support maximum payload size that is supported by the underlying native platform. Customers can use a JSON object to send platform specific messages. See Using SNS Mobile Push API for additional details.

And as per (for example) Apple's PUSH Notification docs:

The JSON payload must not be compressed and is limited to a maximum size of 4 KB (4096 bytes). For a Voice over Internet Protocol (VoIP) notification, the maximum size is 5 KB (5120 bytes)

So if you are using SNS to send push notifications to mobile devices via apple APNS you would want to check that the payload does not exceed 4KB. This is especially relevant when you are sending an object along with your message in an SNS push notification.