amazonka: Comprehensive Amazon Web Services SDK.

[ aws, library, mpl ] [ Propose Tags ] [ Report a vulnerability ]

This client library contains request and response logic to communicate with Amazon Web Service compatible APIs using the types supplied by the various amazonka-* service libraries. See the AWS category on Hackage for supported services.

To get started, import Amazonka and the desired amazonka-* library (such as Amazonka.MachineLearning)

GHC 8.10.7 and higher is officially supported.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.3.1, 0.3.4, 0.3.5, 0.3.6, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.0.1, 1.2.0.2, 1.3.0, 1.3.1, 1.3.2, 1.3.2.1, 1.3.3, 1.3.3.1, 1.3.4, 1.3.5, 1.3.5.1, 1.3.6, 1.3.7, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.4.1, 1.4.4.2, 1.4.5, 1.5.0, 1.6.0, 1.6.1, 2.0 (info)
Change log CHANGELOG.md
Dependencies aeson (>=1.5.0.0 && <1.6 || >=2.0 && <2.3), amazonka-core (>=2.0 && <2.1), amazonka-sso (>=2.0 && <2.1), amazonka-sts (>=2.0 && <2.1), base (>=4.12 && <4.19), bytestring (>=0.10.8), conduit (>=1.3), directory (>=1.2), exceptions (>=0.10.4 && <0.11), http-client (>=0.5 && <0.8), http-conduit (>=2.3 && <3), http-types (>=0.12), ini (>=0.3.5), lens (>=4), resourcet (>=1.1), retry (>=0.7.6.2), text (>=1.1), time (>=1.9), transformers (>=0.2), unordered-containers (>=0.2.14.0 && <0.3), uuid (>=1.2.6 && <1.4) [details]
License MPL-2.0
Copyright Copyright (c) 2013-2023 Brendan Hay
Author Brendan Hay
Maintainer Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>
Revised Revision 1 made by jack at 2024-05-13T07:34:54Z
Category AWS
Home page https://github.com/brendanhay/amazonka
Bug tracker https://github.com/brendanhay/amazonka/issues
Source repo head: git clone git://github.com/brendanhay/amazonka.git(lib/amazonka)
Uploaded by BrendanHay at 2023-07-27T21:26:11Z
Distributions NixOS:2.0
Reverse Dependencies 49 direct, 5 indirect [details]
Downloads 50279 total (74 in the last 30 days)
Rating 2.5 (votes: 7) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-07-28 [all 1 reports]

Readme for amazonka-2.0

[back to package description]

Amazonka

Description

Client library containing request and response logic to communicate with Amazon Web Service compatible APIs. Intended to be used alongside the types supplied by the various amazonka-* service libraries.

Migrating from 1.6.1 to 2.0

CHANGELOG.md is extremely thorough, but these notes should get you started:

  • Modules have been moved from Network.AWS.* to Amazonka.*. Perform a find/replace on your import statements, e.g.:

    perl -pi -e 's/Network\.AWS/Amazonka/g' `find . -type f -name '*.hs'`
    
  • The AWST transformer from Control.Monad.Trans.AWS has been removed. Functions such as send now take an Env as their first argument. You can provide an Env directly, or use whatever transformer or effect system you prefer.

  • The Credentials data type no longer exists. Credential discovery methods are now represented as functions of type EnvNoAuth -> m Env, and common ones are exported from Amazonka.Auth. In most cases you can downcase the first character of a former Credentials constructor and it will do the right thing:

    -- 1.6.1
    env <- newEnv Discover
    
    -- 2.0
    env <- newEnv discover
    

    A full list of new credential providers and their 1.6.1 equivalents, if any, are listed under the "Major Changes" heading of the 2.0 RC 2 section of CHANGELOG.md.

  • On Windows, the {credential,config} files are read from %USERPROFILE%\.aws\{credentials,config} to match the AWS SDK.

  • Many Amazonka functions now require Typeable instances on request/response types. If you write code which is polymorphic across requests and responses, you may need to add Typeable a and Typeable (AWSResponse a) constraints alongside each AWSRequest a constraint.

  • Request/response data types have been simplified:

    • Data type smart constructors are prefixed with new. Example: Network.AWS.S3.getObject -> Amazonka.S3.newGetObject.

    • All generated types export their constructors, which are always the "primed" name of the base type. Example: data GetObject = GetObject' { ... }.

    • Records also export all their fields, which no longer have any prefix.

    • The recommended way to fill in additional record fields is to use a library such as generic-lens or optics, possibly with the OverloadedLabels extension:

      -- 1.6.1
      import Network.AWS.S3
      let req = getObject "my-bucket" "/foo/bar.txt" & goVersionId ?~ "some-version"
      
      -- 2.0
      {-# LANGUAGE OverloadedLabels #-}
      import Amazonka.S3
      import Control.Lens ((?~))
      import Data.Generics.Labels ()
      let req = newGetObject "my-bucket" "/foo/bar.txt" & #versionId ?~ "some-version"
      
    • Generated lenses are still available, but no longer use heuristic abbreviations. Example: Network.AWS.S3.goVersionId is now Amazonka.S3.Lens.getObject_versionId

    • Enums (sum types) are now newtype wrappers over Text. "Constructors" for these enums are provided as "bundled" pattern synonyms, but other values are permitted. This is especially useful for new EC2 instance types or new AWS region names. As with generated lens names, the type name is baked into the pattern synonym. Example: InstanceType_R4_8xlarge.

  • All hand-written records in amazonka-core and amazonka now follow the conventions set by generated records: no leading underscores and no inconsistent prefixing of fields. As part of this, some functions were renamed or removed:

    • Amazonka.Env.configure -> Amazonka.Env.configureService (and its re-export from Amazonka)
    • Amazonka.Env.override -> Amazonka.Env.overrideService (and its re-export from Amazonka)
    • Amazonka.Env.timeout -> Amazonka.Env.globalTimeout (and its re-export from Amazonka)
    • Amazonka.Env.within: removed; with AWST gone, it is just a record update

    The removal of AWST means that Network.AWS.Env functions which used to operate on an Env inside a MonadReader now operate on the Env directly.

  • Serialisation classes like ToText and ToByteString, and their associated helper functions, are no longer directly exported from module Amazonka. If you need these, you may need to import Amazonka.Data directly.

  • The interface to the EC2 Instance Metadata Service (IMDS) is no longer exported from the root Amazonka module. If you used this, you should should import Amazonka.EC2.Metadata directly.

    • The functions Amazonka.dynamic, Amazonka.metadata and Amazonka.userdata have been removed in favour of their equivalents in Amazonka.EC2.Metadata which only require a HTTP Manager, not an entire Env.
    • If you were using them, read the manager :: Manager field directly from your Env.

Contribute

For any problems, comments, or feedback please create an issue here on GitHub.

Licence

amazonka is released under the Mozilla Public License Version 2.0.