Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

bug: S3 list-objects ContinuationToken does not work when files' keys contain = #13745

@gcbirzan-plutoflume

Description

@gcbirzan-plutoflume

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When getting more than 1k objects via list-objects, the first result has IsTruncated and you get a NextContinuationToken. When the the keys (presumably any, but didn't check) contain an = sign, using the continuation token will return a response with KeyCount 0 and no files. We use Hive-style partitioning (s3://foo/date=2026-01-01/) and this breaks it.

This was working with the legacy_v2 provider in 3.x, and it's been broken with the new one since, probably, the beginning of time.

Expected Behavior

After the continuation token is used, the rest of files should be returned.

How are you starting LocalStack?

With a docker run command

Steps To Reproduce

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

docker run  --rm -it   -p 127.0.0.1:4566:4566   -v /var/run/docker.sock:/var/run/docker.sock   localstack/localstack

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

$ for x in $(seq 1001); do touch test_$x; done
$ awslocal s3api create-bucket --bucket test
{
    "Location": "/test"
}
$ awslocal s3 cp --recursive . s3://test/ > /dev/null
$ awslocal s3 ls s3://test/ | wc -l
    1001
$ awslocal s3 cp --recursive . s3://test/foo/ > /dev/null
$ awslocal s3 ls s3://test/foo/ | wc -l
    1001
$ time awslocal s3 cp --recursive . s3://test/foo=42/ > /dev/null
$ awslocal s3 ls s3://test/foo=42/ | wc -l
    1000

restart server

$ rm *
$ for x in $(seq 1001); do touch test=$x; done
$ awslocal s3api create-bucket --bucket test
{
    "Location": "/test"
}
$ time awslocal s3 cp --recursive . s3://test/ > /dev/null
$ awslocal s3 ls s3://test/ | wc -l
    1000

Environment

- OS: macOS
- LocalStack:
LocalStack version: 4.13.2.dev58
LocalStack build date: 2026-02-11
LocalStack build git hash: 17e97ccf2

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions