SNS Error Message: What It Means and How to Fix It
In this article
An SNS error message almost always comes from one of three things: a wrong topic or phone number in the request, missing permissions on the IAM role making the call, or AWS throttling your publishing rate. Read the error code and message string first, because each one points to a different fix.
Time 15 min · Steps 7 · Level Medium
Read the Error Before You Change Anything
Every SNS failure returns a structured response, and the fastest route to a fix is reading it in full. In the AWS CLI and SDKs you get a JSON block with an error code (the short name, such as InvalidParameter) and a message (the sentence that says what was wrong). In CloudWatch logs the same pair appears under error and cause. Menu and field labels can differ slightly by SDK version, but the code names below have been stable for years.
Work Through the Common SNS Errors
- InvalidParameter — check the topic ARN and phone format. Confirm the topic ARN is complete (arn:aws:sns:region:account-id:topic-name) and, for SMS, the phone number is in E.164 format, like +2348012345678 with no spaces or leading zeros.
- NotFound — the resource does not exist in that region. Run the list-topics command in the same region your code is calling; ARNs are region-specific, so a topic created in us-east-1 will not resolve from eu-west-1.
- AuthorizationError — fix the IAM policy. Add sns:Publish permission on the topic ARN to the role or user making the call, and confirm the account is not blocked from SMS spending.
- Throttling — slow down or batch your publishes. Space out requests or move to batching where your SDK supports it; sustained 429-style responses mean you are over the publish rate for the region.
- EndpointDisabled — re-enable the mobile endpoint. A push endpoint gets disabled after repeated delivery failures; call set-endpoint-attributes with Enabled=true after confirming the device token is still valid.
- Check the delivery status side, not just the publish side. A successful publish can still fail delivery; enable delivery logging on the topic and look at CloudWatch metrics for NumberOfNotificationsFailed.
- Capture the full request ID and open a support case if stuck. The request ID in the error response is what AWS support needs to trace what happened.
Confirm the Cause With a Quick Test
Before editing code, reproduce the failure with the smallest possible call. Using the CLI, publish a short test string to the same topic ARN your application uses, from the same region and the same credentials. If the CLI call succeeds but your app fails, the problem is in your app's credentials or its ARN string, not in SNS itself. If the CLI call fails with the same error, you have a clean, minimal case to fix.
For SMS errors, send one test message to your own phone in E.164 format. If it arrives, the failure in production is probably in how numbers are stored — spaces, dashes, or a missing country code are the usual culprits. If it does not arrive and the publish succeeded, the message was accepted by SNS but rejected downstream, which is where delivery logging shows the carrier-level failure reason.
Fix Permissions When AuthorizationError Appears
AuthorizationError means the identity making the call is allowed to reach SNS but not allowed to act on that specific topic. Two policies matter and either can block you. The IAM policy attached to the user or role needs sns:Publish on the topic ARN. The topic's own access policy can also restrict who may publish, so open the topic in the SNS console and check its Access policy statement.
For server-side apps, the common trap is a role assumption that silently falls back to default credentials, so the call goes out under an identity with no SNS rights. Print or log the identity the SDK reports before the publish call and compare it with the one you granted the permission to. If they differ, that mismatch is the whole problem.
Tell Whether Your Fix Worked
- The publish call returns a MessageId instead of an error code — that confirms SNS accepted the message.
- Subscribers actually receive it within roughly a minute for email and near-instant for SMS and push in the normal case.
- CloudWatch shows NumberOfNotificationsPublished rising and NumberOfNotificationsFailed flat over the same window.
- Repeated runs at your normal rate no longer return Throttling responses.
One caution worth repeating: a MessageId only proves SNS accepted the message. Delivery is a separate step, so if subscribers still report missing messages, turn on delivery status logging for the topic and read the per-subscriber failure reasons before assuming the publish is broken.
When the Error Is Not From AWS SNS At All
Some searches for "sns error message" are about social networking apps, not Amazon SNS. If your error appeared inside a social or messaging app on your phone, the usual causes are a dropped connection, an out-of-date app version, or a server-side outage at the app provider. The practical order is: check your connection, force-close and reopen the app, update it from your phone's app store, then check the provider's own status page or official account for outage notices. Clearing the app's cache is the next step on Android; on iOS, offloading the app keeps your data while resetting it. If the message names a specific code, search that exact code with the app's name, since generic codes like "something went wrong" rarely identify the cause.
Official source: Amazon Web Services Documentation