Error: One or more parameter values were invalid: some AttributeDefinitions are not used

Answered by Rafal Wilinski
Solution
An error appearing when trying to create a table with a AttributeDefinitions argument containing unnecessary and unused Attribute definitions. Since DynamoDB is schemaless you don't have to and you shouldn't specify attributes for non-key attributes.
Per AWS Documentation:
AttributeDefinitions - An array of attributes that describe the key schema for the table and indexes.
Solution: Don't include any non-key attribute definitions in AttributeDefinitions. Include only Attributes used by the table index or other Global or Local secondary indexes.
Other Common DynamoDB Errors (with Solutions)
- failed to begin subsegment named 'amazondynamodbv2': segment cannot be found.
- dynamodb exclusivestartkey not working
- com amazonaws services dynamodbv2 model resourcenotfoundexception
- dynamodb local shell not working
- ProvisionedThroughputExceededException DynamoDB
- dynamodb-admin command not found
- Float types are not supported. Use decimal types instead.
- dynamodb query not returning the full item
- could not unconvert attribute dynamodb
- lambda function not triggering from dynamodb
- AWS DynamoDB errors ResourceNotFoundException
- appsync dynamodb not seeing all fields
- DynamoDB Key element does not match the schema
- missing required key 'key' in params dynamodb
- ImportError: No module named boto3 (DynamoDB)
Tired of AWS Console? Try Dynobase.
First 7 days are. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase