From 55d8a75e86b9fc208d4e430274603c1f8f06c29f Mon Sep 17 00:00:00 2001 From: Tom Hulihan Date: Thu, 16 Jul 2015 12:58:46 -0400 Subject: [PATCH 1/3] Specify the aws region when assuming a role --- lib/dockly.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dockly.rb b/lib/dockly.rb index 329fef0..4cbfcde 100644 --- a/lib/dockly.rb +++ b/lib/dockly.rb @@ -64,7 +64,8 @@ def perform_role_assumption Aws.config.update( credentials: Aws::AssumeRoleCredentials.new( role_arn: assume_role, role_session_name: 'dockly' - ) + ), + region: aws_region ) end From db00d3f7aca8a66c7aa9b5acdc9b213c02d2be2e Mon Sep 17 00:00:00 2001 From: Tom Hulihan Date: Thu, 16 Jul 2015 13:03:16 -0400 Subject: [PATCH 2/3] Set the region EVERYWHERE --- lib/dockly.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dockly.rb b/lib/dockly.rb index 4cbfcde..14197ac 100644 --- a/lib/dockly.rb +++ b/lib/dockly.rb @@ -63,7 +63,7 @@ def perform_role_assumption return if assume_role.nil? Aws.config.update( credentials: Aws::AssumeRoleCredentials.new( - role_arn: assume_role, role_session_name: 'dockly' + role_arn: assume_role, role_session_name: 'dockly', region: aws_region ), region: aws_region ) From 64df8dae071195aac9a0e3387b2d78e4710e4bcd Mon Sep 17 00:00:00 2001 From: Todd Lunter Date: Thu, 16 Jul 2015 13:09:27 -0400 Subject: [PATCH 3/3] Specify the client --- lib/dockly.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dockly.rb b/lib/dockly.rb index 14197ac..00c5b81 100644 --- a/lib/dockly.rb +++ b/lib/dockly.rb @@ -63,7 +63,8 @@ def perform_role_assumption return if assume_role.nil? Aws.config.update( credentials: Aws::AssumeRoleCredentials.new( - role_arn: assume_role, role_session_name: 'dockly', region: aws_region + role_arn: assume_role, role_session_name: 'dockly', + client: Aws::STS::Client.new(region: aws_region) ), region: aws_region )