I am trying to send messages using Amazon SNS but it's showing atypical behavior. It sends messages to some of the numbers while may or may not to others.
import boto3
client = boto3.client('sns', .....)
client.publish(PhoneNumber, Message)
I am using the publish API to directly send SMS for OTPs without using Topics. Is there a way I can get the delivery status for them? Would region/DND affect the delivery. This is for Indian numbers. I am using Transactional messages for the same.
On the console there is 'Text Messaging Preferences'. One needs to set up, IAM role for CloudWatch Logs access and Report Storage bucket. Once they are set up, Amazon will start storing logs in CloudWatch. Once done it will start showing delivery rates and status in the console UI and detailed logs in CloudWatch.
There are multitudes of reason for which delivery may fail. It lists out all on them. DND can also affect the delivery even if message type is transactional
.
Also there is a availalble API to query these logs accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With