Skip to content

bug: SQS batch entry IDs are not correctly validated #7312

@nlucero

Description

@nlucero

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Sending a send-message-batch command to SQS with an entry whose ID contains an invalid character (:) is not failing and processed successfully.

Expected Behavior

Command should fail with the following error:

An error occurred (AWS.SimpleQueueService.InvalidBatchEntryId) when calling the SendMessageBatch operation: A batch entry id can only contain alphanumeric characters, hyphens and underscores. It can be at most 80 letters long.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

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

# docker-compose.yml
version: '3.8'
services:
  localstack:
    image: localstack/localstack:latest
    container_name: localstack_success_snapshot
    ports:
      - '6666:4566' # LocalStack Gateway
    environment:
      DEBUG: ${DEBUG-}
      PERSISTENCE: ${PERSISTENCE-}
      LAMBDA_EXECUTOR: ${LAMBDA_EXECUTOR-}
      DOCKER_HOST: 'unix:///var/run/docker.sock'
      HOSTNAME_EXTERNAL: 'localhost'
    volumes:
      - ./localstack-bootstrap:/docker-entrypoint-initaws.d/
$ docker-compose up -d

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

$ aws --endpoint-url http://localhost:6666 sqs create-queue --queue-name my-queue
$ aws --endpoint-url http://localhost:6666 sqs send-message-batch --queue-url https://localhost:6666/000000000/my-queue --entries '[{"Id":"this:should:fail","MessageBody":"Hello world!"}]'

Environment

- OS: MacOS Monterey 12.6.1 (21G217)
- LocalStack: latest

Anything else?

No response

Metadata

Metadata

Assignees

Labels

aws:sqsAmazon Simple Queue Servicetype: bugBug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions