amazonka-mtl: MTL-style type-class and deriving-via newtypes for Amazonka

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

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.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.2, 0.1.1.3
Change log CHANGELOG.md
Dependencies amazonka (>=2.0), amazonka-core (>=2.0), base (>=4.14.3.0 && <5), conduit (>=1.3.4.2), lens (>=4.19.2), monad-logger (>=0.3.36), mtl (>=2.2.2), resourcet (>=1.2.4.3), unliftio-core (>=0.2.0.1) [details]
License MIT
Author
Maintainer Freckle Education
Category Utils
Home page https://github.com/freckle/amazonka-mtl#readme
Bug tracker https://github.com/freckle/amazonka-mtl/issues
Source repo head: git clone https://github.com/freckle/amazonka-mtl
Uploaded by PatrickBrisbin at 2025-06-18T13:37:11Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for amazonka-mtl-0.1.1.2

[back to package description]

amazonka-mtl

Hackage Stackage Nightly Stackage LTS CI

MTL-style type-class and deriving-via newtypes for Amazonka.

Example

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 the documentation on hackage for all the details.

Development & Tests

stack build --fast --pedantic --test --file-watch

Release

To trigger a release, merge a commit to main that follows Conventional Commits. In short,

We don't enforce conventional commits generally (though you are free do so), it's only required if you want to trigger release.


CHANGELOG | LICENSE