add lookup

This commit is contained in:
2025-12-01 22:27:14 -03:00
parent f3e3d9f8c2
commit 8eb5427af4
22 changed files with 548 additions and 133 deletions

View File

@@ -69,11 +69,15 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
update_expr = 'SET cert = :cert, updated_at = :now'
expr_attr_values = {
':now': now_,
':cert': {'issued_at': now_} | ({'s3_uri': s3_uri} if s3_uri else {}),
':cert': {'issued_at': now_}
| ({'expires_at': expires_at} if expires_at else {})
| ({'s3_uri': s3_uri} if s3_uri else {}),
}
# Post-migration: remove the following lines
if expires_at:
update_expr = 'SET cert = :cert, cert_expires_at = :cert_expires_at, \
update_expr = 'SET cert = :cert, \
cert_expires_at = :cert_expires_at, \
updated_at = :now'
expr_attr_values[':cert_expires_at'] = expires_at