add iugu files

This commit is contained in:
2026-01-09 11:21:21 -03:00
parent 823134f450
commit 721a5b471d
8 changed files with 745 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
from uuid import uuid4
from aws_lambda_powertools import Logger
from aws_lambda_powertools.utilities.data_classes import (
EventBridgeEvent,
event_source,
)
from aws_lambda_powertools.utilities.typing import LambdaContext
from layercake.dateutils import now
logger = Logger(__name__)
@event_source(data_class=EventBridgeEvent)
@logger.inject_lambda_context
def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
new_image = event.detail['new_image']
now_ = now()
org_id = ''
order_id = new_image['id']
docx = {
'id': f'SEAT#ORG#{org_id}',
'sk': f'ORDER#{order_id}#ENROLLMENT#{uuid4()}',
'course': {},
'created_at': now_,
}
return True