From 9cb760c6c8326c27b48dfc2815e97e5a7f9ab506 Mon Sep 17 00:00:00 2001 From: Adam Robinson <21spock@gmail.com> Date: Wed, 5 Jan 2022 11:38:21 +0000 Subject: [PATCH] Update the AWS STS endpoint to be regional as the method is now regional. Required to support AWS GovCloud. Fixes https://github.com/abonas/kubeclient/issues/527 Signed-off-by: Adam Robinson <21spock@gmail.com> --- lib/kubeclient/aws_eks_credentials.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kubeclient/aws_eks_credentials.rb b/lib/kubeclient/aws_eks_credentials.rb index be2fb81f..1522c958 100644 --- a/lib/kubeclient/aws_eks_credentials.rb +++ b/lib/kubeclient/aws_eks_credentials.rb @@ -29,7 +29,7 @@ def token(credentials, eks_cluster, region: 'us-east-1') # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sigv4/Signer.html#presign_url-instance_method presigned_url_string = signer.presign_url( http_method: 'GET', - url: 'https://sts.amazonaws.com/?Action=GetCallerIdentity&Version=2011-06-15', + url: "https://sts.#{region}.amazonaws.com/?Action=GetCallerIdentity&Version=2011-06-15", body: '', credentials: credentials, expires_in: 60,