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.

已提問 3 年前檢視次數 1198 次
1 個回答
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'
]

                ],
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南