Skip to content

Commit 181a406

Browse files
author
Lucy Cunningham
committed
Ensure kms client is initialized
1 parent f314d04 commit 181a406

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bless/aws_lambda/bless_lambda_lyft_host.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ def lambda_lyft_host_handler(
219219
'System entropy was {}, which is lower than the entropy_'
220220
'minimum {}. Using KMS to seed /dev/urandom'.format(
221221
entropy, entropy_minimum_bits))
222+
if not kms_client:
223+
kms_client = boto3.client('kms', region_name=region)
222224
response = kms_client.generate_random(
223225
NumberOfBytes=random_seed_bytes)
224226
random_seed = response['Plaintext']

0 commit comments

Comments
 (0)