Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion localstack-core/localstack/services/sns/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
MSG_ATTR_NAME_REGEX = re.compile(r"^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_\-.]+$")
ATTR_TYPE_REGEX = re.compile(r"^(String|Number|Binary)\..+$")
VALID_MSG_ATTR_NAME_CHARS = set(ascii_letters + digits + "." + "-" + "_")
E164_REGEX = re.compile(r"^\+?[1-9]\d{1,14}$")


GCM_URL = "https://fcm.googleapis.com/fcm/send"
Expand All @@ -42,6 +43,7 @@
SNS_CERT_ENDPOINT = "/_aws/sns/SimpleNotificationService-6c6f63616c737461636b69736e696365.pem"

DUMMY_SUBSCRIPTION_PRINCIPAL = "arn:{partition}:iam::{account_id}:user/DummySNSPrincipal"
E164_REGEX = re.compile(r"^\+?[1-9]\d{1,14}$")

VALID_APPLICATION_PLATFORMS = list(get_args(SnsApplicationPlatforms))

MAXIMUM_MESSAGE_LENGTH = 262144
6 changes: 6 additions & 0 deletions localstack-core/localstack/services/sns/v2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,15 @@ class SnsStore(BaseStore):
# maps endpoint arns to platform endpoints
platform_endpoints: dict[str, PlatformEndpoint] = LocalAttribute(default=dict)

# cache of topic ARN to platform endpoint messages (used primarily for testing)
platform_endpoint_messages: dict[str, list[dict]] = LocalAttribute(default=dict)

# topic/subscription independent default values for sending sms messages
sms_attributes: dict[str, str] = LocalAttribute(default=dict)

# list of sent SMS messages
sms_messages: list[dict] = LocalAttribute(default=list)

TAGS: TaggingService = CrossRegionAttribute(default=TaggingService)


Expand Down
Loading
Loading