from aws_lambda_powertools.event_handler.api_gateway import Router from layercake.dynamodb import DynamoDBPersistenceLayer, PartitionKey from boto3clients import dynamodb_client from config import COURSE_TABLE router = Router() dyn = DynamoDBPersistenceLayer(COURSE_TABLE, dynamodb_client) @router.get('//seats') def seats(org_id: str): return dyn.collection.query( PartitionKey(f'SEAT#ORG#{org_id}'), limit=150, )