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