From e82d4c22b8561b562f1feb321c49fb7601da2f77 Mon Sep 17 00:00:00 2001 From: Roth Date: Thu, 3 Aug 2023 11:13:55 -0700 Subject: [PATCH] updating lambda functions from 3.8 to 3.11 --- CFN_DEPLOY_AHA.yml | 6 +++--- handler.py | 2 ++ terraform/Terraform_DEPLOY_AHA/Terraform_DEPLOY_AHA.tf | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CFN_DEPLOY_AHA.yml b/CFN_DEPLOY_AHA.yml index 05fa587..f360705 100644 --- a/CFN_DEPLOY_AHA.yml +++ b/CFN_DEPLOY_AHA.yml @@ -318,7 +318,7 @@ Resources: Properties: Description: Copies AHA .zip from a source S3 bucket to a destination Handler: index.handler - Runtime: python3.8 + Runtime: python3.11 Role: !GetAtt 'CopyAHARole.Arn' Timeout: 240 Code: @@ -404,7 +404,7 @@ Resources: MemorySize: 128 Timeout: 600 Role: ${LambdaExecutionRole.Arn} - Runtime: python3.8 + Runtime: python3.11 Environment: Variables: REGIONS: ${Regions} @@ -654,7 +654,7 @@ Resources: Timeout: 600 Role: 'Fn::Sub': '${LambdaExecutionRole.Arn}' - Runtime: python3.8 + Runtime: python3.11 Environment: Variables: ACCOUNT_IDS: diff --git a/handler.py b/handler.py index 951871a..83c156f 100644 --- a/handler.py +++ b/handler.py @@ -18,6 +18,8 @@ get_message_for_teams, get_org_message_for_teams, get_message_for_email, get_org_message_for_email, \ get_detail_for_eventbridge +print("boto3 version: ",boto3.__version__) + # query active health API endpoint health_dns = socket.gethostbyname_ex('global.health.amazonaws.com') (current_endpoint, global_endpoint, ip_endpoint) = health_dns diff --git a/terraform/Terraform_DEPLOY_AHA/Terraform_DEPLOY_AHA.tf b/terraform/Terraform_DEPLOY_AHA/Terraform_DEPLOY_AHA.tf index dae01a5..45165bd 100644 --- a/terraform/Terraform_DEPLOY_AHA/Terraform_DEPLOY_AHA.tf +++ b/terraform/Terraform_DEPLOY_AHA/Terraform_DEPLOY_AHA.tf @@ -669,7 +669,7 @@ resource "aws_lambda_function" "AHA-LambdaFunction-PrimaryRegion" { # s3_key = var.S3Key reserved_concurrent_executions = -1 role = aws_iam_role.AHA-LambdaExecutionRole.arn - runtime = "python3.8" + runtime = "python3.11" environment { variables = { @@ -716,7 +716,7 @@ resource "aws_lambda_function" "AHA-LambdaFunction-SecondaryRegion" { # s3_key = var.S3Key reserved_concurrent_executions = -1 role = aws_iam_role.AHA-LambdaExecutionRole.arn - runtime = "python3.8" + runtime = "python3.11" environment { variables = {