From d759f163317586e478dd313154834be95077e2a8 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Fri, 22 Nov 2019 07:39:33 +0000 Subject: [PATCH] Specify region name when creating Lambda roles --- tests/test_awslambda/test_lambda.py | 2 +- tests/test_cloudformation/test_cloudformation_stack_crud.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_awslambda/test_lambda.py b/tests/test_awslambda/test_lambda.py index 6eaf1107c..e0e8a8205 100644 --- a/tests/test_awslambda/test_lambda.py +++ b/tests/test_awslambda/test_lambda.py @@ -1549,7 +1549,7 @@ def create_invalid_lambda(role): def get_role_name(): with mock_iam(): - iam = boto3.client("iam") + iam = boto3.client("iam", region_name="us-west-2") try: return iam.get_role(RoleName="my-role")["Role"]["Arn"] except ClientError: diff --git a/tests/test_cloudformation/test_cloudformation_stack_crud.py b/tests/test_cloudformation/test_cloudformation_stack_crud.py index 8ae01e7f2..c499d21bc 100644 --- a/tests/test_cloudformation/test_cloudformation_stack_crud.py +++ b/tests/test_cloudformation/test_cloudformation_stack_crud.py @@ -598,7 +598,7 @@ def test_create_stack_kinesis(): def get_role_name(): with mock_iam(): - iam = boto3.client("iam") + iam = boto3.client("iam", region_name="us-west-2") return iam.create_role( RoleName="TestRole", AssumeRolePolicyDocument="some_policy" )["Role"]["Arn"]