add postgres

This commit is contained in:
2025-08-26 00:00:42 -03:00
parent 1326530991
commit e33eccebb9
43 changed files with 622 additions and 636 deletions

View File

@@ -4,7 +4,7 @@ from aws_lambda_powertools.utilities.data_classes import (
event_source,
)
from aws_lambda_powertools.utilities.typing import LambdaContext
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair, SortKey, TransactKey
from layercake.dynamodb import DynamoDBPersistenceLayer, SortKey, TransactKey
from boto3clients import dynamodb_client
from config import (
@@ -21,8 +21,8 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
new_image = event.detail['new_image']
enrollment = enrollment_layer.collection.get_items(
TransactKey(pk=new_image['id'])
+ SortKey('METADATA#DEDUPLICATION_WINDOW', rename_key='DEDUPLICATION_WINDOW')
+ SortKey('METADATA#COURSE', rename_key='COURSE'),
+ SortKey('METADATA#DEDUPLICATION_WINDOW', rename_key='deduplication_window')
+ SortKey('METADATA#COURSE', rename_key='course'),
)
return True