0

Error as : Unable to get item: Error executing "GetItem" on "https://dynamodb.us-east-1.amazonaws.com"; AWS HTTP error: Client error: POST https://dynamodb.us-east-1.amazonaws.com resulted in a 400 Bad Request response: {"__type":"com.amazon.coral.validate#ValidationException","message":"The provided key element does not match the schema" (truncated...) ValidationException (client): The provided key element does not match the schema - {"__type":"com.amazon.coral.validate#ValidationException","message":"The provided key element does not match the schema"}

Already set key credentials on .aws/credentials file.

1
  • What is the exact request syntax you are making and what are the partition and sort keys (and their data types) your table is made up of? Commented Jan 9, 2020 at 7:28

1 Answer 1

0

The AWS DynamoDB documentation defines the 400 Bad request Validation error as:

The input fails to satisfy the constraints specified by an AWS service.

The GetItem DynamoDB request includes Key parameter (required); for DynamoDB table with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key (see GetItem API request documentation).

Most likely, you are either missing a hash or soft key in cases where one is required; or the name of the hash key or sort key does not match the one defined for DynamoDB table. For example, you might have specified "id" in GetItem request but your DynamoDB table has "Item_ID" as sort or has key attribute name.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.