From 3373c5bf13edf2dfe1eb9dd6e493630c387e8729 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Fri, 13 Apr 2018 15:17:38 -0400 Subject: [PATCH] Fix SNS max subject length. Closes #1503. --- moto/sns/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moto/sns/models.py b/moto/sns/models.py index a66523614..acfbac550 100644 --- a/moto/sns/models.py +++ b/moto/sns/models.py @@ -315,7 +315,8 @@ class SNSBackend(BaseBackend): return self._get_values_nexttoken(self.subscriptions, next_token) def publish(self, arn, message, subject=None, message_attributes=None): - if subject is not None and len(subject) >= 100: + if subject is not None and len(subject) > 100: + # Note that the AWS docs around length are wrong: https://github.com/spulec/moto/issues/1503 raise ValueError('Subject must be less than 100 characters') try: