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年前1155ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ