I'm selecting data from my DynamoDB database using boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table(table_name)
response = table.scan(ProjectionExpression='Id,Name')['Items']
Works fine. Now I also want to retrieve an attribute that is (unfortunately) named with a reserved word - let's say CONNECTION.
response = table.scan(ProjectionExpression='Id,Name,Connection')['Items']
I get an error like
An error occurred (ValidationException) when calling the Scan operation: Invalid ProjectionExpression: Attribute name is a reserved keyword; reserved keyword: Connection
I know there's an aliasing technique if using filters or queries, but does this exist for simple projections from boto3?