Skip to content

Commit 425ec18

Browse files
author
Jason Liu
authored
Change profile credential provider to default credential provider (#182)
1 parent b4eaa20 commit 425ec18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

validator/src/main/java/com/amazon/aoc/clients/CortexClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import com.amazon.aoc.models.prometheus.PrometheusMetric;
77
import com.amazon.aoc.models.prometheus.PrometheusQueryResult;
88
import com.amazonaws.auth.AWS4Signer;
9-
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
9+
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
1010
import com.amazonaws.http.AWSRequestSigningApacheInterceptor;
1111
import com.amazonaws.util.IOUtils;
1212
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -44,7 +44,7 @@ public CortexClient(Context context) {
4444
this.httpClient = HttpClients.custom()
4545
.addInterceptorLast(
4646
new AWSRequestSigningApacheInterceptor(APS_SERVICE_NAME, signer,
47-
new ProfileCredentialsProvider()))
47+
new DefaultAWSCredentialsProviderChain()))
4848
.setRetryHandler(new DefaultHttpRequestRetryHandler())
4949
.setDefaultRequestConfig(
5050
RequestConfig.custom()

0 commit comments

Comments
 (0)