[Haskell-cafe] Amazonka: How to generate S3:// uri from Network.AWS.S3.Types.Object?

Cody Goodman codygman.consulting at gmail.com
Wed Nov 1 06:43:46 UTC 2017


Question: How can I generate an S3://absolute/url from an Object (
https://hackage.haskell.org/package/amazonka-s3-1.4.5/docs/Network-AWS-S3-Types.html#t:Object
)?

Context: I've been using turtle to call "aws s3 ls" and I'm trying to
figure out how to replace that with amazonka. Absolute s3 urls were central
to how my program worked. I KNow how to get objects now and filter them,
but I don't know how to convert an object to an S3 url to integrate with my
existing program.

I came across the getFile function (
https://github.com/brendanhay/amazonka/blob/4fdd746346323aac7de6e82752b16609ef0bf212/examples/src/Example/S3.hs#L65)
and tried downloading a file from s3.

Perhaps I had something wrong, but it didn't seem like just the S3 Bucket
and S3 Object key were enough to download a given file. If I'm wrong about
that I need to double check my configuration.

Thanks,

Cody Goodman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20171101/cf730653/attachment.html>


More information about the Haskell-Cafe mailing list