Skip to content

@aws-sdk/client-s3 DeleteObjects command is breaking due to inclusion of x-id query param  #3931

@arciisine

Description

@arciisine

Type of request

[x] bug report

Detailed description

This seems to be a change that was released on 4/14 in the aws-sdk-js-v3 Line.

By modifying the aws-sdk to not send x-id=DeleteObjects, the code works perfectly fine. Leaving it in, causes the request to break, and return a 500.

I see some code in s3_listener.py that references x-id, but not for this operation. I'm not sure how it all plays together, but it looks like the change in the sdk is having unintended consequences.

Expected behavior

Delete objects should work as expected, without issue.

Actual behavior

Delete objects is failing with a 500, due to the presence of the x-id query parameter.

Steps to reproduce

Use the latest @aws-sdk/client-s3 module, and issue a deleteObjects operation.

Command used to start LocalStack

docker run --privileged=true \
  -p 4566 -p 4571 -p 8080 -p 8081 \
  -e TEST_AWS_ACCOUNT_ID=000000000000 \
  -e LOCALSTACK_HOSTNAME=localhost \
  -e DEFAULT_REGION=us-east-1 \
  -e HOST_TMP_FOLDER=/tmp/folder \
  -v /tmp/folder:/tmp/localstack \
  localstack/localstack:0.12.10`

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

await this.client.deleteObjects({
  Bucket: this.config.bucket,
  Delete: {
    Objects: items // [{ Key: 'key1'}, {Key: 'key2'}...]
  }
});

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions