Skip to content

SMS from SNS topics failing due to 'no quota left'

0

We have noticed that SMS sent from SNS topics have been failing since at least the 10th due to "No quota left for account". We usually have a low volume of SMS sent and have a reasonably high spend limit. How could we confirm that we have genuinely hit this limit and not having some other issue?

1 Answer
0

Troubleshooting SNS SMS "No quota left for account" Errors

When you're experiencing SMS failures from SNS topics with the "No quota left for account" error despite having a low volume of messages and a high spend limit, it's important to systematically investigate whether you've genuinely hit a limit or if there's another underlying issue. Here's a comprehensive troubleshooting guide:

  1. Verify Your SMS Spend Limits and Usage Check Current Spend Limits

    Navigate to the AWS End User Messaging SMS console Go to Account > Spend limits Review your: Monthly spend limit (default is often $1.00 in sandbox mode) Account spend threshold Current month's spending

Review Actual Usage Patterns

In the same console, check the Analytics section
Look for any unusual spikes in SMS volume that might have occurred around the 10th
Verify if there were any automated processes or applications that might have sent a large batch of messages

2. Examine CloudWatch Metrics and Logs Review SNS CloudWatch Metrics

Open the CloudWatch console
Navigate to Metrics > All metrics > SNS
Look for metrics like:
    NumberOfNotificationsFailed
    NumberOfNotificationsDelivered
    SMSSuccessRate
Set the time range to include the period before and after the 10th

Enable and Check Detailed SMS Delivery Logs

Using AWS CLI to enable SMS delivery status logging

aws sns set-sms-attributes
--attributes '{"DeliveryStatusSuccessSamplingRate":"100", "DeliveryStatusLogging":"true"}'

Check CloudWatch Logs for detailed delivery status information
Look for specific error codes or patterns in the failures

3. Check Account Status and Restrictions Verify SMS Sandbox Status

In the AWS End User Messaging SMS console, check if your account is in the SMS sandbox
Sandbox accounts have stricter limitations (typically $1.00 monthly limit)
If you're in the sandbox, you can only send to verified phone numbers

Check for Account-Level Restrictions

Log in to the AWS Support Center
Check for any notifications about account restrictions
Review any recent communications from AWS regarding your SMS usage

4. Investigate Regional and Carrier Issues Check Destination Country Support

Verify that the countries you're sending to are supported by AWS SNS
Some countries have specific restrictions or higher costs that might impact quotas differently

Review Carrier-Specific Issues

Some carriers might block messages or have specific requirements
Check if the failures are specific to certain carriers or phone numbers

5. Analyze Message Content and Patterns Review Message Content

Check if your messages contain content that might trigger filtering
Ensure compliance with local regulations and carrier requirements

Check for Duplicate Messages

Verify if your application might be sending duplicate messages
Look for any loops or retry mechanisms that might be multiplying your SMS volume

6. Confirm Quota Type

AWS has different types of quotas for SMS messaging: Account Spend Quota

The maximum amount you can spend on SMS in a month

Message Parts Quota

The number of message parts you can send per second
Default is often 20 parts per second

Daily SMS Quota

Some accounts have daily sending quotas in addition to monthly spend limits

7. Practical Steps to Resolve the Issue Immediate Actions

Request Quota Increase:
    Open the AWS Support Center
    Create a new case selecting "Service Limit Increase"
    Choose "SNS Text Messaging" as the limit type
    Provide details about your use case and expected volume

Move Out of the SMS Sandbox (if applicable):
    In the AWS End User Messaging SMS console
    Request to move out of the sandbox mode
    Provide details about your SMS use case

Implement Temporary Workarounds:
    Prioritize critical SMS messages
    Consider alternative notification methods temporarily (email, push notifications)
    Implement rate limiting in your application

Monitoring and Prevention

Set Up CloudWatch Alarms:

# Example CLI command to create an alarm for SMS spend
aws cloudwatch put-metric-alarm \
  --alarm-name SNSSpendingAlarm \
  --alarm-description "Alarm when SMS spending exceeds 80% of quota" \
  --metric-name SMSMonthToDateSpentUSD \
  --namespace AWS/SNS \
  --statistic Maximum \
  --period 86400 \
  --threshold $(echo "YOUR_LIMIT * 0.8" | bc) \
  --comparison-operator GreaterThanThreshold \
  --evaluation-periods 1 \
  --alarm-actions YOUR_SNS_TOPIC_ARN

Implement Programmatic Quota Monitoring:
    Use AWS SDK to periodically check your remaining quota
    Implement alerts when approaching limits

8. Long-term Solutions

Regular Quota Reviews:
    Schedule monthly reviews of your SMS usage and quotas
    Proactively request increases based on projected growth

Message Optimization:
    Optimize message length to reduce the number of message parts
    Consider using shortened URLs if applicable

Consider AWS Pinpoint:
    For more advanced SMS capabilities and analytics
    Better controls for managing SMS campaigns and quotas

By following these steps, you should be able to determine whether you've genuinely hit a quota limit or if there's another issue affecting your SMS deliveries. If you need any clarification on specific steps or would like more detailed information on any part of this troubleshooting process, please let me know. Sources

https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox-verifying-phone-numbers.html

https://docs.aws.amazon.com/sns/latest/dg/channels-sms-awssupport-spend-threshold.html

https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-troubleshooting.html

https://docs.aws.amazon.com/sms-voice/latest/userguide/awssupport-spend-threshold.html

AWS

answered a year ago

EXPERT

reviewed a year 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.