serverless-haskell: Deploying Haskell code onto AWS Lambda using Serverless

[ aws, cloud, library, mit, network ] [ Propose Tags ] [ Report a vulnerability ]

Utilities to help process the events from AWS Lambda when deployed with the serverless-haskell plugin.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0, 0.0.2, 0.0.3, 0.0.4, 0.0.6, 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.10, 0.8.11, 0.9.0, 0.9.1, 0.9.3, 0.9.4, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.11.2, 0.11.3, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6
Dependencies aeson, aeson-casing, amazonka-core, amazonka-kinesis, amazonka-s3, base (>=4.7 && <5), bytestring, lens, text, time, unix, unordered-containers [details]
License MIT
Author
Maintainer akotlyarov@seek.com.au
Category AWS, Cloud, Network
Home page https://github.com/seek-oss/serverless-haskell#readme
Bug tracker https://github.com/seek-oss/serverless-haskell/issues
Source repo head: git clone https://github.com/seek-oss/serverless-haskell
Uploaded by AlexeyKotlyarov at 2018-01-06T22:07:01Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 29498 total (132 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-01-06 [all 1 reports]

Readme for serverless-haskell-0.0.2

[back to package description]

Serverless Haskell

Deploying Haskell code onto AWS Lambda using Serverless.

Usage

  • Initialise a Serverless project in the same directory as your Stack-enabled package.

  • Install serverless-haskell plugin (Warning: not uploaded to NPM registry yet, install manually by cloning this repository and specifying its serverless-plugin directory to npm install).

  • Add the following to serverless.yml:

    provider:
      name: aws
      runtime: nodejs6.10
    
    functions:
      myfunc:
        handler: mypackage.myfunc
        # Here, mypackage is the Haskell package name and myfunc is the executable
        # name as defined in the Cabal file
    
    plugins:
      - serverless-haskell
    
  • Write your main function:

    import qualified Data.Aeson as Aeson
    
    import AWSLambda
    
    main = lambdaMain handler
    
    handler :: Aeson.Value -> IO [Int]
    handler evt = do
      putStrLn "This should go to logs"
      print evt
      pure [1, 2, 3]
    
  • Use sls deploy to deploy the executable to AWS Lambda. Note: sls deploy function is not supported.

See AWSLambda for the documentation.

Releasing

  • Install bumpversion: pip install bumpversion.
  • Run bumpversion major|minor|patch.
  • Run git push --tags && git push.