This commit is contained in:
2026-01-21 21:31:32 -03:00
parent 26c3df876f
commit 37a9b20188
38 changed files with 1009 additions and 532 deletions

View File

@@ -9,6 +9,7 @@ from aws_lambda_powertools.event_handler.api_gateway import (
)
from aws_lambda_powertools.logging import correlation_paths
from aws_lambda_powertools.utilities.typing import LambdaContext
from layercake.dateutils import now
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
from boto3clients import dynamodb_client, s3_client
@@ -53,8 +54,14 @@ def postback():
dyn.update_item(
key=KeyPair(enrollment_id, '0'),
cond_expr='attribute_exists(sk)',
update_expr='SET cert.s3_uri = :s3_uri',
expr_attr_values={':s3_uri': s3_uri},
update_expr='SET cert.s3_uri = :s3_uri, \
cert.signed = :true, \
updated_at = :now',
expr_attr_values={
':s3_uri': s3_uri,
':true': True,
':now': now(),
},
)
return Response(status_code=HTTPStatus.NO_CONTENT)