The latest version of amazonka-mtl is 0.1.1.0-1.

amazonka-mtl

Version 0.1.0.0 revision 1 uploaded by PatrickBrisbin.

Package meta

Synopsis
MTL-style type-class and deriving-via newtypes for Amazonka
Description

This package allows incorporation of AWS actions into any MTL-style function,

import Amazonka.Data.Text (ToText(..))
import Amazonka.S3.ListObjects
import Amazonka.S3.Types.Object
import Blammo.Logging
import Conduit
import Control.Lens hiding ((.=))
import Control.Monad.AWS as AWS

someAction
  :: ( MonadIO m
     , MonadLogger m
     , MonadAWS m
     , MonadReader env m
     , HasSettings env
     )
  => m ()
someAction = do
  Settings {..} <- view settingsL

  keys <-
    runConduit
      $ paginate (newListObjects settingsBucketName)
      .| concatMapC (^. listObjectsResponse_contents)
      .| concatC
      .| mapC (^. object_key . to toText)
      .| iterMC (\k -> logDebug $ k :# [])
      .| sinkList

  logInfo $ "Bucket contents" :# ["keys" .= keys]

This package also provides a number of options for execution:

This package also provides mechanisms for mocking AWS in tests:

Please see individual module documentation for all the details.

Author
n/a
Bug reports
https://github.com/freckle/amazonka-mtl/issues
Category
Utils
Copyright
n/a
Homepage
https://github.com/freckle/amazonka-mtl#readme
Maintainer
Freckle Education
Package URL
n/a
Stability
n/a

Components