Skip to content

Commit

Permalink
fix: move client out of try-with-resource to fix authentication when …
Browse files Browse the repository at this point in the history
…using role assumption
  • Loading branch information
sberss committed Jul 16, 2024
1 parent eb90398 commit 176e394
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOExcept
var timeOut = TIMEOUT_TIME_LENGTH_1;
final var unit = MINUTES;

try (S3AsyncClient client = s3Directory.getFileSystem().client()) {
client.putObject(
try {
s3Directory.getFileSystem().client().putObject(
PutObjectRequest.builder()
.bucket(s3Directory.bucketName())
.key(directoryKey)
Expand Down

0 comments on commit 176e394

Please sign in to comment.