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.

gefragt vor 3 Jahren1200 Aufrufe
1 Antwort
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'
]

                ],
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen