From 4dcefd01307d0aead49117e2b3869f05daa1b259 Mon Sep 17 00:00:00 2001 From: Maurizio Branca Date: Tue, 24 Sep 2024 23:06:22 +0200 Subject: [PATCH] Cleanup --- handlers/aws/handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handlers/aws/handler.py b/handlers/aws/handler.py index 6c365025..d7fa5364 100644 --- a/handlers/aws/handler.py +++ b/handlers/aws/handler.py @@ -49,8 +49,6 @@ def lambda_handler(lambda_event: dict[str, Any], lambda_context: context_.Contex AWS Lambda handler in handler.aws package Parses the config and acts as front controller for inputs """ - lambda_arn = parse_arn(lambda_context.invoked_function_arn) - shared_logger.debug("lambda triggered", extra={"invoked_function_arn": lambda_context.invoked_function_arn}) try: @@ -143,6 +141,7 @@ def lambda_handler(lambda_event: dict[str, Any], lambda_context: context_.Contex if trigger_type == "cloudwatch-logs": cloudwatch_logs_event = _from_awslogs_data_to_event(lambda_event["awslogs"]["data"]) + lambda_arn = parse_arn(lambda_context.invoked_function_arn) shared_logger.info("trigger", extra={"size": len(cloudwatch_logs_event["logEvents"])})