Skip to content

Commit

Permalink
Swtich to list from walk as it seems more stble for S3.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmagnu committed Dec 25, 2024
1 parent 7c2ba9b commit 386d078
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ private S3Client createClient(Credentials cred) {
AwsCredentialsProvider getCredentialsProvider(Credentials cred) {
if (cred == null || cred.isNull()) {
log.info("CredentialsProvider: DefaultCredentialsProvider for null creds");
return DefaultCredentialsProvider.create();
throw new IllegalArgumentException("Credentials are required for S3 access");
//return DefaultCredentialsProvider.create();
} else {
var awsKey = cred.getOrDefault(Credentials.Attr.KEY, "");
var awsSecret = cred.getOrDefault(Credentials.Attr.SECRET, "");
Expand All @@ -181,7 +182,8 @@ AwsCredentialsProvider getCredentialsProvider(Credentials cred) {
}
} else {
log.info(String.format("CredentialsProvider: DefaultCredentialsProvider for %s:%s", cred.getService(), cred.getLookupKey()));
return DefaultCredentialsProvider.create();
throw new IllegalArgumentException(String.format("CredentialsProvider: DefaultCredentialsProvider for %s:%s", cred.getService(), cred.getLookupKey()));
//return DefaultCredentialsProvider.create();
}
}
}
Expand Down

0 comments on commit 386d078

Please sign in to comment.