summaryrefslogtreecommitdiffstats
path: root/jdisc-cloud-aws
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@verizonmedia.com>2021-03-08 12:43:23 +0100
committerØyvind Grønnesby <oyving@verizonmedia.com>2021-03-08 12:43:23 +0100
commita49425678f505a19d5e08193e765d0bac2ccbb55 (patch)
treeaee8151d7a0c318b934f8ef975981457c1ed2952 /jdisc-cloud-aws
parenta324acb8c5d40c76819da2e0145bac8940e9f749 (diff)
Use the DEFAULT_REGION when building STS client
Diffstat (limited to 'jdisc-cloud-aws')
-rw-r--r--jdisc-cloud-aws/src/main/java/com/yahoo/jdisc/cloud/aws/AwsParameterStore.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/jdisc-cloud-aws/src/main/java/com/yahoo/jdisc/cloud/aws/AwsParameterStore.java b/jdisc-cloud-aws/src/main/java/com/yahoo/jdisc/cloud/aws/AwsParameterStore.java
index 4f657f78590..61e0051022d 100644
--- a/jdisc-cloud-aws/src/main/java/com/yahoo/jdisc/cloud/aws/AwsParameterStore.java
+++ b/jdisc-cloud-aws/src/main/java/com/yahoo/jdisc/cloud/aws/AwsParameterStore.java
@@ -3,6 +3,7 @@
package com.yahoo.jdisc.cloud.aws;
import com.amazonaws.auth.STSAssumeRoleSessionCredentialsProvider;
+import com.amazonaws.regions.Regions;
import com.amazonaws.services.securitytoken.AWSSecurityTokenService;
import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder;
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement;
@@ -43,6 +44,7 @@ public class AwsParameterStore extends AbstractComponent implements SecretStore
for (var store : configuredStores) {
AWSSecurityTokenService tokenService = AWSSecurityTokenServiceClientBuilder
.standard()
+ .withRegion(Regions.DEFAULT_REGION)
.withCredentials(credentialsProvider)
.build();