Amazon SNS fails to send SMS messages from a cloud server when the body of the message contains the following string: devCollector.local:
and the AWS dashboard logs display, Phone carrier has blocked this message
.
Because of the error, I assumed that the carrier for the phone I was using to test notifications (Verizon) was blocking the message so I attempted with a Google voice number and got the same result. After some troubleshooting I found that if I removed the .
delimiter and changed the message body to devCollector (local):
the SMS notification would go through without issue. The message is being sent via a JS script using Node.js v14.19.1
I can send the following string in the message body: jeremy-crow.local
from my local machine without issue to both my test phone ( carrier: Verizon ) and to a Google voice number using the same script running Node.js v14.18.3
.
Something else worth noting is that I can send the offending string from my phone directly to my Google voice number and vice versa, which is further evidence that it's related to Amazon SNS (or both carrier's treatment of SNS).
I'd like to know why the presence of the string devCollector.local
in the message body when sending SMS messages through Amazon SNS from an Azure cloud server is causing the messages to fail so that I can avoid this in the future (and hopefully help others to avoid the issue as well). Thanks for your help.