Dora
Dora

Reputation: 6970

aws sns sms usage reports, able to save message body?

I now that we can set up SNS service SMS subscription which would save the MessageId and few other info.

At first, I thought it would also save the messages too but while reading the records, it is not included.

Is there a way to include it or it's just something we have to do manually while sending the sms?

Thanks in advance for any help.

Upvotes: 0

Views: 326

Answers (1)

pnv
pnv

Reputation: 231

The message content is not part of your delivery receipt metadata, so it's a good practice that you do your own book-keeping and track all the messages you've sent. A sample schema could be something like:

Destination Phone Number (e.g. +12065551234)

ISO Country Code (e.g. US)

Sent Date (epoch)

Message Id (auto-generated from request)

MCCMNC carrier information

Message Content

Then you can store all this data in a data storage of your choice.

An example architecture (that is cost efficient for high traffic) could be:

  • Create metadata POJO and serialize into JSON

  • Use Kinesis Firehose to stream/batch your serialized metadata into S3

  • Use AWS Glue to determine the schema of your S3 objects

  • Use AWS Athena to query your stored S3 data

You can read the documentation on how to setup CloudWatch to store metrics and logs for SMS deliveries here

Another recommendation is to check your SMS usage reports. Here is the documentation for that.

Best of luck.

Disclosure: I work in AWS and I worked in the Mobile Messaging (SMS/Push) team.

Upvotes: 1

Related Questions