hs-aws-lambda-0.1.0.2: A modern and easy-to-use wrapper for Docker-based Lambda implementations
Safe HaskellNone
LanguageHaskell2010

AWS.Lambda.RuntimeAPI

Synopsis

Documentation

runLambda :: (MonadUnliftIO m, MonadFail m, MonadThrow m, FromJSON a, ToJSON b, NFData a, NFData b) => (LambdaInvocation a -> m (LambdaResult b)) -> m () Source #

This function is intended to be your main implementation. Given a handler for LambdaInvocation instances, it loops indefinitely (until AWS terminates the process) on the retrieval of invocations. It feeds each of those invocations into the handler that was passed in as an argument. It then posts the result back to AWS and begins the loop again.