I would like to be able to transfer the contents of the contents of the S3 bucket through Servant as the response body.
I am having problems with an instance of MonadResource instance for Handler:
src/Servant/Streaming/Example.hs:29:3: error:
* No instance for (MonadResource Handler)
arising from a use of `runAWS'
* In a stmt of a 'do' block: runAWS env conduits
In the expression:
do env <- newEnv Discover
runAWS env conduits
In an equation for `server':
server
= do env <- newEnv Discover
runAWS env conduits
|
29 | runAWS env conduits
| ^^^^^^^^^^^^^^^^^^^
I created a repository for playback: https://github.com/domenkozar/servant-streaming-amazonka
servant-streaming-serverprocesses ResourceTfor Stream (Of BS.ByteString) (ResourceT IO) () https://github.com/plow-technologies/servant-streaming/blob/master/servant-streaming-server/src/Servant/Streaming/Server/Internal.hs#L77-L79
but since I use Amazonka, I also need to make sure that the MonadResource for the handler is taken in this bracket. Itβs not clear to me how to do this.
, enter/hoistServer , ( ).
:
- EDIT:
$$ $$+- - EDIT2: , MonadResource