From 32e0c2f7579bd5ec7a769667630710a95921e403 Mon Sep 17 00:00:00 2001 From: Josh Carlson Date: Fri, 16 Aug 2024 13:13:16 -0400 Subject: [PATCH] Generate aws session in scan.py Relates To: SECENG-1648 --- lambda_code/scan/scan.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lambda_code/scan/scan.py b/lambda_code/scan/scan.py index b0e0d00..2758b78 100644 --- a/lambda_code/scan/scan.py +++ b/lambda_code/scan/scan.py @@ -291,6 +291,8 @@ def lambda_handler(event, context): # pylint:disable=unused-argument account_id = event["Id"] account_name = event["Name"] + aws_session = assume_role(account_id) + hosted_zones = list_hosted_zones(event) for hosted_zone in hosted_zones: