Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support path-style access URLs #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aws/sdk/s3.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down