bug: dynamodb batch write item returns 500 if missing primary key and sort key from item(s) #6290
Open
1 task done
Labels
aws:dynamodb
AWS Dynamodb
good first issue
Good item to work on for newcomers
status: triage needed
LocalStack maintainers need to evaluate this issue
type: bug
Bug relating to LocalStack
Is there an existing issue for this?
Current Behavior
When running
batch-write-item
andrequest-items
is missing the primary key and/or the sort key for a given table it returns500
meaning that anysdk
will try again before exhausting retries and hiding the trueValidationException
error.Expected Behavior
Return
ValidationException
errorHow are you starting LocalStack?
With a
docker run
commandSteps To Reproduce
docker run -d --rm -it -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack aws --endpoint-url=http://localhost:4566 dynamodb create-table \ --table-name temp-table \ --attribute-definitions AttributeName=id,AttributeType=S AttributeName=sortKey,AttributeType=S \ --key-schema AttributeName=id,KeyType=HASH AttributeName=sortKey,KeyType=RANGE \ --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 aws --endpoint-url=http://localhost:4566 dynamodb list-tables aws --endpoint-url=http://localhost:4566 dynamodb batch-write-item \ --request-items '{"temp-table":[{"PutRequest":{"Item":{"anotherKey":{"S":"missing primary key and sort key"}}}}]}'
Environment
Anything else?
Run this against AWS and correct error will return with no retries
The text was updated successfully, but these errors were encountered: