ex-aws / ex_aws_s3

165 stars 146 forks source link

Create Signed URL with custom domain #154

Open akashsethiya opened 2 years ago

akashsethiya commented 2 years ago

Current behavior

bucket_name = "a.example.com"
ExAws.Config.new(:s3)
|> Map.put(:access_key_id, s3_access_key)
|> Map.put(:secret_access_key, s3_secret_key)
|> ExAws.S3.presigned_url(
  :get,
  bucket_name,
  "test1.pdf",
  expires_in: 1000
)

This generates url of the format https://s3.ap-south-1.amazonaws.com/a.example.com/test1.pdf?....

Expected behavior

I need url in the below format https://a.example.com/test1.pdf?....

Whats missing here?? Please help

gr8Adakron commented 2 years ago

This issue has been resolved in recent PRhttps://github.com/ex-aws/ex_aws_s3/pull/156