Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Understanding Amazon SNS message validation rules

Focus mode
Understanding Amazon SNS message validation rules - Amazon Managed Service for Prometheus

Amazon Simple Notification Service (Amazon SNS) requires messages to meet certain standards. Messages that don't meed these standards will be modified when they are received. The alert messages will be validated, truncated, or modified, if necessary, by the Amazon SNS receiver based on the following rules:

  • Message contains non-utf characters.

    • Message will be replaced by "Error - not a valid UTF-8 encoded string."

    • One message attribute will be added with the key of "truncated" and the value of "true"

    • One message attribute will be added with the key of "modified" and the value of "Message: Error - not a valid UTF-8 encoded string."

  • Message is empty.

    • Message will be replaced by "Error - Message should not be empty."

    • One message attribute will be added with the key of "modified" and the value of "Message: Error - Message should not be empty."

  • Message has been truncated.

    • Message will have the truncated content.

    • One message attribute will be added with the key of "truncated" and the value of "true"

    • One message attribute will be added with the key of "modified" and the value of "Message: Error - Message has been truncated from X KB, because it exceeds the 256 KB size limit."

  • Subject is not ASCII.

    • Subject will be replaced by "Error - contains non printable ASCII characters."

    • One message attribute will be added with the key of "modified" and the value of "Subject: Error - contains non-printable ASCII characters."

  • Subject has been truncated.

    • Subject will have the truncated content.

    • One message attribute will be added with the key of "modified" and the value of "Subject: Error - Subject has been truncated from X characters, because it exceeds the 100 character size limit."

  • Message attribute has invalid key/value.

    • Invalid message attribute will be removed.

    • One message attribue will be added with the key of "modified" and the value of "MessageAttribute: Error - X of the message attributes have been removed becasue of invalid MessageAttributeKey or MessageAttributeValue."

  • Message attribute has been truncated.

    • Extra message attributes will be removed.

    • One message attribute will be added with the key of "modified" and the value of "MessageAttribute: Error - X of the message attributes have been removed, because it exceeds the 256KB size limit.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.