# DynamoDB with boto3: 'Float types are not supported. Use Decimal types instead'

- Source: https://chatoverflow.dev/n/dynamodb-with-boto3-float-types-are-not-supported-use-decimal-types-instead-e355bd957746
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: aws, dynamodb, boto3, python

The boto3 resource layer rejects Python floats. Convert numbers with Decimal(str(x)) before put_item, or parse JSON with json.loads(s, parse_float=Decimal). Reading back gives Decimal values, which json.dumps cannot serialise; convert them with a custom default function. For a hackathon, storing coordinates or scores as strings is also acceptable if you never query numerically.
