wai-lambda alternatives and similar packages
Based on the "wai" category.
Alternatively, view wai-lambda alternatives based on common mentions on social networks and blogs.
-
wai-middleware-auth
Authentication middleware that secures WAI application -
wai-middleware-static
WAI middleware that intercepts requests to static files and serves them if they exist. -
wai-middleware-throttle
WAI Request Throttling Middleware -
wai-middleware-metrics
WAI middleware that collects requests metrics -
wai-middleware-rollbar
Middleware that communicates to Rollbar. -
wai-cli
Command line runner for Wai apps (using Warp) with TLS, CGI, socket activation & graceful shutdown | now on https://codeberg.org/unrelentingtech/wai-cli -
wai-middleware-crowd
Middleware and utilities for using Atlassian Crowd authentication -
wai-session-postgresql
WAI Session that keeps its data in a PostgreSQL database -
wai-util
Utility functions for WAI that haven't found another home yet -
wai-session-clientsession
Session store based on clientsession -
wai-session-tokyocabinet
Session store based on Tokyo Cabinet -
wai-middleware-hmac
WAI HMAC Authentication Middleware and Client -
wai-middleware-preprocessor
WAI middleware for static file preprocessors -
wai-digestive-functors
Helpers to bind digestive-functors onto wai requests -
wai-middleware-delegate
A WAI middleware that enables proxying WAI requests to another server. -
wai-middleware-headers
addHeaders and cors for Haskell's Network.Wai -
wai-middleware-caching
WAI Middleware to cache (contains generic, LRUCache and Redis Cache backend) -
wai-middleware-static-embedded
Serve static files embedded in your executable as a wai middleware. -
wai-middleware-static-caching
WAI middleware that intercepts requests to static files and serves them if they exist. -
wai-middleware-travisci
WAI middleware for authenticating webhook payloads from Travis CI -
wai-feature-flags
Feature flag support for WAI applications. -
wai-logger-buffered
A buffered logger for wai applications -
wai-middleware-slack-verify
WAI Slack request verification middleware -
wai-handler-snap
Web Application Interface handler using snap-server. (deprecated)
Build time-series-based applications quickly and at scale.
Do you think we are missing an alternative of wai-lambda or a related project?
README
WAI Lambda - Haskell Webapps on AWS Lambda
This Haskell library turns any wai webapp (spock, servant, etc) into a handler for AWS Lambda and API Gateway requests.
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.HTTP.Types
import Network.Wai.Handler.Lambda (run)
app :: Application
app _ respond = do
putStrLn "I've done some IO here"
respond $ responseLBS
status200
[("Content-Type", "text/plain")]
"Hello, Web!"
main :: IO ()
main = run app
This doesn't require any particular Lambda environment. By following the
instructions in the build section the resulting zip
file uploaded
to AWS Lambda is typically smaller than 1MB. For basic webapps the request
handling duration (as reported by AWS) is between 1 and 5 milliseconds.
- Install with either Cabal, stack or Nix.
- Build for AWS with Nix and fully static executables.
- Deploy to AWS with Nix and Terraform.
Install
Cabal
Installing with Cabal:
$ cabal install wai-lambda
Stack
If you use stack and wai-lambda
is not included in your snapshot, add it to
the extra-deps
:
extra-deps:
- wai-lambda-0.1.0.0
or from GitHub:
packages:
- ...
- location:
git: https://github.com/deckgo/wai-lambda.git
commit: <some commit>
extra-dep: true
Nix
You do not have to do anything if you use cabal2nix and a Nix commit that
includes wai-lambda
in its Hackage dependencies. If you want to use a
specific commit of wai-lambda
we recommend using niv:
$ niv add deckgo/wai-lambda
Then add an override to your Nix packages:
rec
{
sources = import ./nix/sources.nix; # from niv
pkgs = import sources.nixpkgs {};
myHaskellPackages = pkgs.haskellPackages.override
{ overrides = self: super:
{ "wai-lambda" =
super.callCabal2nix "wai-lambda" sources.wai-lambda;
};
};
}
See also the build section for producing AWS Lambda packages with nix.
Build
TODO
For inspiration on how to build fully static executables with Nix, see DeckDeckGo
Deploy
TODO
For inspiration on how to deploy with Terraform and Nix, see DeckDeckGo
License
MIT © David Dal Busco and Nicolas Mattia
*Note that all licence references and agreements mentioned in the wai-lambda README section above
are relevant to that project's source code only.