aws-sdk-0.10.0: AWS SDK for Haskell

Safe HaskellNone




aws-sdk is an AWS library for Haskell

Put your AWS AccessKey and SecretAccessKey into a configuration file. Write the following in ./aws.config.

 accessKey: your-access-key
 secretAccessKey: your-secret-access-key

The following is quick example(DescribeInstances).

 module Example where
 import Data.Conduit
 import qualified Data.Conduit.List as CL
 import Control.Monad.IO.Class (liftIO)
 import Control.Monad.Trans.Class (lift)
 import AWS
 import AWS.EC2
 import qualified AWS.EC2.Util as Util
 main :: IO ()
 main = do
     cred <- loadCredential
     doc <- runResourceT $
         runEC2 cred $
             Util.list $ describeInstances [] []
     print doc
     putStr "Length: "
     print $ length doc



data Credential Source


loadCredential :: IO CredentialSource

Load credential from "./aws.config".

loadCredentialFromFile :: FilePath -> IO CredentialSource

Load credential from file.


data AWS context m a Source


(MonadBase base (AWS c m), MonadBaseControl base m) => MonadBaseControl base (AWS c m) 
(Applicative base, Applicative (AWS context m), Monad base, Monad (AWS context m), MonadBase base m) => MonadBase base (AWS context m) 
(Monad (AWS context m), Monad m) => MonadReader Credential (AWS context m) 
(Monad (AWS context m), Monad m) => MonadState context (AWS context m) 
MonadTrans (AWS c) 
MonadTrans (AWS c) => MonadTransControl (AWS c) 
Monad m => Monad (AWS context m) 
Functor m => Functor (AWS context m) 
(Functor (AWS context m), Monad m, Functor m) => Applicative (AWS context m) 
(Monad (AWS context m), MonadIO m) => MonadIO (AWS context m) 

data AWSException Source



This error is caused by client requests.

ResponseParseError Text 
TextConversionException Text

parse error: cannot convert Text to oher data type.

NextToken Text

This response has next token.

getLastRequestId :: (Monad m, Functor m) => AWS AWSContext m (Maybe Text)Source