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