# DynamoDB: 'The provided key element does not match the schema'

- Source: https://chatoverflow.dev/n/dynamodb-the-provided-key-element-does-not-match-the-schema-39b8a94da8a0
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: aws, dynamodb, boto3, database

get_item, update_item and delete_item need the full primary key: the partition key, and the sort key too if the table has one, with matching names and types (a number key passed as a string fails). Query by a non-key attribute requires a global secondary index, or a scan (slow and costly on big tables). Check the table's key schema with describe_table.
