mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
lambda: fix undefined variable and initially define account_id as None (#32249)
This commit is contained in:
@@ -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
|
several different ways. Giving either IAM or STS privilages to
|
||||||
the account should be enough to permit this.
|
the account should be enough to permit this.
|
||||||
"""
|
"""
|
||||||
|
account_id = None
|
||||||
try:
|
try:
|
||||||
sts_client = boto3_conn(module, conn_type='client', resource='sts',
|
sts_client = boto3_conn(module, conn_type='client', resource='sts',
|
||||||
region=region, endpoint=endpoint, **aws_connect_kwargs)
|
region=region, endpoint=endpoint, **aws_connect_kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user