add postgres
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user