Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bug: SNS batch entry IDs are not correctly validated #13526

Open
Labels
aws:snsAmazon Simple Notification Servicestatus: backlogTriaged but not yet being worked ontype: bugBug report
@krlxgrn

Description

@krlxgrn

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

SNS has some validation on the entry ids in batch publish requests including allowed characters and length:https://docs.aws.amazon.com/sns/latest/api/API_PublishBatchRequestEntry.html

LocalStack does not currently perform this validation

awslocal sns publish-batch --topic-arn"arn:aws:sns:us-east-1:112233445566:my-topic-local" --publish-batch-request-entries'[{"Id": "message.id", "Message": "{}"}]'{"Successful": [        {"Id":"message.id","MessageId":"3a6c4dfe-2329-47a7-a8aa-905abdc04a43"        }    ],"Failed": []}awslocal sns publish-batch --topic-arn"arn:aws:sns:us-east-1:112233445566:my-topic-local" --publish-batch-request-entries'[{"Id": "myreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongid", "Message": "{}"}]'{"Successful": [        {"Id":"myreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongid","MessageId":"cf07aa73-9357-427d-b2b0-f15b3eb76c82"        }    ],"Failed": []}

Expected Behavior

Publishing in AWS gives these errors:

aws sns publish-batch --topic-arn"arn:aws:sns:eu-west-2:*:my-topic" --publish-batch-request-entries'[{"Id": "my.message.id", "Message": "{}"}]'An error occurred (InvalidBatchEntryId) when calling the PublishBatch operation: The Id of a batch entryin the batch request contains an impermissible character: my.message.idaws sns publish-batch --topic-arn"arn:aws:sns:eu-west-2:*:my-topic" --publish-batch-request-entries'[{"Id": "myreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongid", "Message": "{}"}]'An error occurred (InvalidBatchEntryId) when calling the PublishBatch operation: The Id of a batch entryin the batch request is too long: myreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongid

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g.,bin/localstack command, arguments, ordocker-compose.yml)

services:localstack:image:localstack/localstack:4.12.0container_name:localstackenvironment:      -DEBUG=1      -LS_LOG=info      -SERVICES=events,lambda,s3,secretsmanager,sns,sqs      -HOSTNAME=localstack      -LAMBDA_REMOVE_CONTAINERS=falsevolumes:      -./images/localstack:/etc/localstack/init/ready.d      -/var/run/docker.sock:/var/run/docker.sockports:      -'4566:4566'

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

awslocal sns create-topic --name my-topic-localawslocal sns publish-batch --topic-arn"arn:aws:sns:us-east-1:112233445566:my-topic-local" --publish-batch-request-entries'[{"Id": "message.id", "Message": "{}"}]'

Environment

- OS: macOS 15.6.1- LocalStack:  LocalStack version: 4.12.0  LocalStack build date: 2025-12-11  LocalStack build git hash: b570b3ee2

Anything else?

Similar to#7312

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws:snsAmazon Simple Notification Servicestatus: backlogTriaged but not yet being worked ontype: bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp