Comments (6)
Make sure you allow us to do GetBucketLocation() to get the region or please set the right region to generate correct presigned URL
from minio-hs.
Thanks for your report @themmes - we will send a fix for it. The presign URL code does not do anything special for AWS at this time, but we will fix this.
The main thing is we need to use the region to generate the pre-signed URL for AWS because buckets cannot be referenced with https://s3.amazonaws.com they need to be put into virtual bucket DNS style.
So this looks like a bug in minio-hs at this point.
from minio-hs.
I was under the impression that I did set the region, for context this is my code
s3signUrl :: Text -> IO (Maybe Text)
s3signUrl url = do
awsConn <- awsCI
|> setRegion Config.awsRegion
|> setCredsFrom [fromAWSEnv]
res <- runMinio awsConn $ do
presignedGetObjectUrl Config.awsS3Bucket url (3600*2) [] []
pure case res of
Left _ -> Nothing
Right signedUrl -> Just (cs signedUrl)
from minio-hs.
I've just verified by running the aws cli aws s3api get-bucket-location --bucket <bucket_name>
that returns the bucket location. Is that what you mean with allowing you to do GetBucketLocation()
? I've also set the environment variable AWS_DEFAULT_REGION
to the right region. Is there still something I'm missing?
from minio-hs.
Thanks for your report @themmes - we will send a fix for it. The presign URL code does not do anything special for AWS at this time, but we will fix this.
from minio-hs.
@donatello Thanks for getting back to me this quickly!
So there is some bug causing this? Let me know if I can help.
Is there any temporary fix I could use on my end to work around it? I've tried hacking the URL to match the expected format, but S3 seems to reject the signature, so I might have broken it by changing the url.
from minio-hs.
Related Issues (20)
- Replace Minio with MinIO and minio.io with min.io
- minio-hs-1.2.0 build error: No instance for (MonadThrow Minio) HOT 3
- listObjects lack retry mechanism HOT 9
- Minio constructor is hidden for runResourceT intergration. HOT 4
- minio putObject always fail! HOT 6
- putObject don't support Conduit sink way HOT 3
- bucket notify event support ? HOT 1
- Make MinioT monad transformer HOT 1
- Support for Yandex Object Storage
- Tests start failing with unordered-containers 0.2.16
- Add support for STS credentials
- Add support for calling MinIO's STS APIs
- Add support for listing objects with versioning
- Add support for fetching and deleting specific versions of objects
- Add APIs to enable and suspend versioning on a bucket
- Add network tracing support HOT 1
- minio-hs-0.3.2 build fails with latest resourcet HOT 8
- poo* and goo* functions are lacking documentation on hackage HOT 2
- Implement setConfig/getConfig admin API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minio-hs.