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 local unable to open database file
- can't pickle thread.lock objects typeerror boto3 python dynamodb
- dynamodb localhost not working
- dynamodb-admin is not recognized as an internal or external command
- 'dynamodb' object has no attribute 'table'
- dynamodb atomic counter not working
- aws.dynamodb.converter.unmarshall not working
- Unable to start DynamoDB Local process
- One or more parameter values were invalid: some AttributeDefinitions are not used
- Boto3 DynamoDB KeyError
- dynamodb the parameter cannot be converted to a numeric value
- dynamodb list_append returns true but does not work
- dynamodb table not exists
- com amazonaws services dynamodbv2 model resourcenotfoundexception
- DynamoDB Delete Not Working
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase