SNS error - SMS "Rate exceeded" after 3 messages

0

Hello,

I am attempting to send SMS via SNS. Attempting to send 5 messages, 3 are received successfully but this error is returned and the 4th and 5th users do not receive the message:

Error executing "SetSMSAttributes" on "https://sns.us-west-2.amazonaws.com".... Sending SMS failed. Error message: Rate exceeded

According to this page: https://docs.aws.amazon.com/general/latest/gr/sns.html , the limit is 900 transactions per second. I do not understand why I am getting this error at such a low level.

The messages are very short. A second test had the exact same result (3 sent and then error).

FYI using the PHP SDK.

Please advise.

asked 2 years ago223 views
1 Answer
0

In case anyone has a similar problem.

I was calling SetSMSAttributes and Publish on each request, to set the transaction type. However SetSMSAttributes has a much lower limit per second, and does not need to be called on each request for that purpose. Instead you can use MessageAttributes on the Publish request.

'MessageAttributes' => [
'AWS.SNS.SMS.SMSType' => [
'DataType' => 'String',
'StringValue' => 'Transactional'
]

                ],
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions