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,