Skip to content

Commit d99025b

Browse files
let assume role session duration to be set as default 15 minutes
1 parent f6cd799 commit d99025b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

s3/src/main/java/com/instaclustr/kafka/connect/s3/TransferManagerProvider.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static AmazonS3ClientBuilder getS3ClientBuilderWithRegionAndCredentials(f
4242
AWSStaticCredentialsProvider awsStaticCredentialsProvider = new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secret));
4343
AWSCredentialsProvider awsCredentialsProvider;
4444

45-
if (roleArn == null || StringUtils.isBlank(roleArn)) {
45+
if (StringUtils.isBlank(roleArn)) {
4646
// when IAM user has direct access to the S3 bucket
4747
awsCredentialsProvider = awsStaticCredentialsProvider;
4848
} else {
@@ -58,7 +58,6 @@ public static AmazonS3ClientBuilder getS3ClientBuilderWithRegionAndCredentials(f
5858

5959
awsCredentialsProvider = assumeRoleBuilder
6060
.withStsClient(awsSecurityTokenService)
61-
.withRoleSessionDurationSeconds((int) TimeUnit.HOURS.toSeconds(1))
6261
.build();
6362
}
6463

0 commit comments

Comments
 (0)