-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
documentationThis is a problem with documentation.This is a problem with documentation.dynamodbp2This is a standard priority issueThis is a standard priority issuepagination
Description
I create a DynamoDB paginator like this:
paginator = client.get_paginator('query')
page_iterator = paginator.paginate(
TableName=TABLE_NAME,
IndexName=INDEX_NAME,
KeyConditionExpression=Key('X').eq(x) & Key('Y').lte(y)
)
for page in page_iterator:
print (page['Items'])
return
When I run it, I receive the following error:
Exception has occurred: ParamValidationError
Parameter validation failed:
Invalid type for parameter KeyConditionExpression, value: <boto3.dynamodb.conditions.And object at 0x111524110>, type: <class 'boto3.dynamodb.conditions.And'>, valid types: <class 'str'>
The exact same KeyConditionExpression works when I query the table directly:
result = table.query(
IndexName=INDEX_NAME,
KeyConditionExpression=Key('X').eq(x) & Key('Y').lte(y)
)
BTW: Documentation says that KeyConditionExpression should be a string and not some condition built this way.
huw0, stonekyx and tech3371
Metadata
Metadata
Assignees
Labels
documentationThis is a problem with documentation.This is a problem with documentation.dynamodbp2This is a standard priority issueThis is a standard priority issuepagination