From 27b2c3bd25df67cc83c8a718443cc969f8c2fea6 Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Fri, 27 Oct 2017 09:40:01 -0400 Subject: [PATCH] lambda: fix undefined variable and initially define account_id as None (#32249) --- lib/ansible/modules/cloud/amazon/lambda.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/cloud/amazon/lambda.py b/lib/ansible/modules/cloud/amazon/lambda.py index 7c7adbe8c65..edf1d1525f4 100644 --- a/lib/ansible/modules/cloud/amazon/lambda.py +++ b/lib/ansible/modules/cloud/amazon/lambda.py @@ -225,6 +225,7 @@ def get_account_id(module, region=None, endpoint=None, **aws_connect_kwargs): several different ways. Giving either IAM or STS privilages to the account should be enough to permit this. """ + account_id = None try: sts_client = boto3_conn(module, conn_type='client', resource='sts', region=region, endpoint=endpoint, **aws_connect_kwargs)