diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java b/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java index c2b900d1fb1..136206fb5af 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java @@ -89,6 +89,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import com.amazonaws.client.builder.AwsClientBuilder; import com.amazonaws.services.securitytoken.AWSSecurityTokenService; import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder; import com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException; @@ -337,6 +338,7 @@ public void login(final LoginCallback prompt, final CancelCallback cancel) throw final CustomClientConfiguration configuration = new CustomClientConfiguration(host, new ThreadLocalHostnameDelegatingTrustManager(trust, host.getHostname()), key); final AWSSecurityTokenServiceClientBuilder builder = AWSSecurityTokenServiceClientBuilder.standard() + .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(host.getProtocol().getSTSEndpoint(), null)) .withCredentials(AWSCredentialsConfigurator.toAWSCredentialsProvider(client.getProviderCredentials())) .withClientConfiguration(configuration); final AWSSecurityTokenService service = builder.build();