diff --git a/src/aws/sdk/s3.clj b/src/aws/sdk/s3.clj index f9cc748..d834540 100644 --- a/src/aws/sdk/s3.clj +++ b/src/aws/sdk/s3.clj @@ -15,6 +15,7 @@ (:import com.amazonaws.auth.BasicAWSCredentials com.amazonaws.auth.BasicSessionCredentials com.amazonaws.services.s3.AmazonS3Client + com.amazonaws.services.s3.S3ClientOptions com.amazonaws.AmazonServiceException com.amazonaws.ClientConfiguration com.amazonaws.HttpMethod @@ -80,6 +81,9 @@ client (AmazonS3Client. aws-creds client-configuration)] (when-let [endpoint (:endpoint cred)] (.setEndpoint client endpoint)) + (when-let [path-style-access? (:path-style-access? cred)] + (->> (.withPathStyleAccess (S3ClientOptions.) path-style-access?) + (.setS3ClientOptions client))) client))) (def ^{:private true :tag AmazonS3Client}