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, USER_TABLE router = Router() dyn = DynamoDBPersistenceLayer(USER_TABLE, dynamodb_client) @router.get('//custompricing') def get_custom_pricing(org_id: str): return dyn.collection.query( PartitionKey(f'CUSTOM_PRICING#ORG#{org_id}'), table_name=COURSE_TABLE, limit=100, )