Skip to content

Commit

Permalink
fix(runner): add region to CloudWatch client
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mulier-p committed Mar 27, 2024
1 parent 6da6739 commit 65df8cd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ public RunnerResult run(RunContext runContext, ScriptCommands commands, List<Str
AbstractLogConsumer logConsumer = commands.getLogConsumer();

String renderedRegion = runContext.render(this.region);
Region regionObject = Region.of(renderedRegion);
BatchClientBuilder batchClientBuilder = BatchClient.builder()
.credentialsProvider(ConnectionUtils.credentialsProvider(this.awsClientConfig(runContext)))
.region(Region.of(renderedRegion))
.region(regionObject)
// Use the httpClientBuilder to delegate the lifecycle management of the HTTP client to the AWS SDK
.httpClientBuilder(serviceDefaults -> ApacheHttpClient.builder().build());

Expand Down Expand Up @@ -415,6 +416,7 @@ public RunnerResult run(RunContext runContext, ScriptCommands commands, List<Str
CloudWatchLogsAsyncClient cloudWatchLogsAsyncClient =
CloudWatchLogsAsyncClient.builder()
.credentialsProvider(ConnectionUtils.credentialsProvider(this.awsClientConfig(runContext)))
.region(regionObject)
.build();
try {
String logGroupName = "/aws/batch/job";
Expand Down

0 comments on commit 65df8cd

Please sign in to comment.