Error: Float types are not supported. Use decimal types instead.

Answered by Rafal Wilinski
What's Causing This Error
This error occurs with the AWS Python SDK when trying to persist an item containing an attribute with a floating-point number. For example, you may encounter this error in Python if you try to save an item with a float (30.51) value.
Solution - Here's How To Resolve It
You can convert the floating-point attribute to a string using Python's str() function.
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('my-custom-table')
// using str will help avoid the floating point error.
item = {'name': 'item_name', 'floating_attribute': str(our_value)}
table.put_item(Item=item)
Other Common DynamoDB Errors (with Solutions)
- dynamodb request is missing authentication token
- ImportError: No module named boto3 (DynamoDB)
- DynamoDB Delete Not Working
- DynamoDB Mapper Could Not Instantiate Class
- AWS CLI DynamoDB Error Parsing Parameter
- DynamoDB BatchSave not working
- DynamoDB is missing the key id in the item
- dynamodb list_append returns true but does not work
- DynamoDB No Regionendpoint Or Serviceurl Configured
- could not lookup table in dynamodb
- dynamodb cannot convert undefined to object
- dynamodb value cannot be null. (parameter 'type')
- DynamoDB Scan Not Working
- sls dynamodb install not working
- dynamodb does not support null values
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase