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

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
some AttributeDefinitions are not used means CreateTable includes attribute definitions that no table or secondary-index key uses. AttributeDefinitions describes key attributes, not every field an item may contain.
- Collect the attribute names used by the table KeySchema and every GSI and LSI KeySchema.
- Define each distinct key attribute once with its matching S, N or B type.
- Remove ordinary fields, including attributes listed only in an INCLUDE projection. You can write those fields to items without declaring them.
{
"TableName": "Orders",
"BillingMode": "PAY_PER_REQUEST",
"AttributeDefinitions": [
{ "AttributeName": "pk", "AttributeType": "S" },
{ "AttributeName": "sk", "AttributeType": "S" }
],
"KeySchema": [
{ "AttributeName": "pk", "KeyType": "HASH" },
{ "AttributeName": "sk", "KeyType": "RANGE" }
]
}This table can still store status, total and document attributes. Add a definition for status only if a table or secondary-index key uses it. In Terraform, the equivalent rule applies to attribute blocks; in CloudFormation it applies to AttributeDefinitions.
See table creation and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- DynamoDB query is slow
- AWS CLI DynamoDB Error Parsing Parameter
- DynamoDB cannot do operations on a non-existent table
- DynamoDB Error All Attributes Must Be Indexed
- dynamodb cannot assign requested address
- DynamoDB Query Limit Not Working
- dynamodb atomic counter not working
- Could not connect to the endpoint URL https:dynamodb.singapore.amazonaws.com
- DynamoDB Error 413
- moto dynamodb not working
- dynamodb cannot create preexisting table
- dynamodb streams missing events
- ImportError: No module named boto3 (DynamoDB)
- Unable to start DynamoDB Local process
- DynamoDB scan does not return all items
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable
DynamoDB Info
© 2026 Dynobase