Based on aws documentation , https://docs.aws.amazon.com/code-library/latest/ug/python_3_dynamodb_code_examples.html, i'm using boto3 client to create/update data in a dynamodb table. dynamodb supports string, numbers , lists ,sets and boolean (see sample below) . based on the example, i'm setting an item , with a boolean . but i get an error that expected value for attribute is string, but i'm trying to set it as a boolean true/false value. how do i construct my request , such that i can set a boolean value in dynamo db via python? I understand the item is a python dictonary, i can set string values but not boolean?
db = boto3.client('dynamo')
try:
db.put_item(
Item={
"year": year,
"title": title,
"info": {"plot": plot, "rating": Decimal(str(rating))},
"rating" : 42,
"award" : {"BOOL": False}
}
)
except ClientError as err:
logger.error(err)