bug: DynamoDB Query rejects KeyConditions with FilterExpression accepted by AWS (Pro dev105) #78
AndreKurait
started this conversation in
Bugs (AWS)
Replies: 1 comment 1 reply
|
Hi @AndreKurait We reproduced the issue on our latest dev build and confirmed that AWS accepts these requests, so it’s now with our engineering team for review. We’ll update this thread once a fix is available so you can test it. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
LocalStack rejects Query requests combining legacy
KeyConditionswithFilterExpression, while live AWS accepts this specific combination and evaluates the predicates. The equivalent KeyConditionExpression control works on both.Environment
localstack/localstack-pro:dev, version 2026.10.0.dev105, build 3a0ece14; Pro license activation verified.linux/amd64image:sha256:acec8be1241f45d56519b20746d0208041e331ad2913be1eb03fd8d582121a2d.linux/arm64:sha256:8f4da21eb967b43d53b3e2c66597979bc3bf58eaf6816295c3fa2b138f24b4e7.sha256:b38e4fcb56751f999637f3395fd9ef4a593a4b96b57887d9b62ce44c6f22b5aa, pulled 2026-10-12.EC2_VM_MANAGER=mock, no DynamoDB provider overrides, extensions, or source patches.us-east-1, boto31.43.111. ARM comparison: 2026-10-12 16:44:05–16:44:09 UTC; exact AMD64 comparison: 16:47:07–16:47:12 UTC. Same outcomes on both architectures.Observed versus expected
LocalStack returns HTTP 400 before query evaluation:
The live AWS baseline completed in
us-east-1on 2026-10-12 at 16:12:35 UTC, using an isolated table and synthetic data. Four real Query calls compared old/new key representations with matching/nonmatching filter values. All used consistent reads.AWS's legacy-parameter overview warns against mixing legacy and expression parameters, while its KeyConditions page also describes applying FilterExpression after the legacy key query. This report requests parity with the specifically observed service behavior, not blanket acceptance of every legacy/expression combination.
Minimal reproducer
Start a disposable container with your own auth token set in the environment:
After readiness, install boto3 and run the script below. This standalone reproducer was executed against the exact AMD64 image above. All AWS credentials are dummy values and the endpoint is loopback LocalStack. Fixtures are cleaned up.
On the affected image, both
query-old-*cases fail validation.query-new-7returns the item andquery-new-8returns an empty result. Live AWS accepted both key representations with the same results.All reactions