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년 전1197회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠