Haskell on AWS Lambda - A Detailed Tutorial
This tutorial, along with the accompanying source-code walks you through the process of:
- managing AWS Lambda Functions completely in Haskell with the exception of an unavoidable dependency on Docker
- building a custom AWS Lambda runtime in Haskell, which is useful if you ever have requirements that aren’t already handled by the AWS Lambda Haskell Runtime
- using Docker, along with aws-lambda-packager, to compile your Haskell code for AWS Lambda, and package it along with all it’s native dependencies
Apart from that, we even share some opinions and first-hand experiences:
- Avoid using
serverless-haskell
- Avoid using AWS API Gateway
- Avoid struggling with static linking
amazonka
maintenance issues- Using the
zip
Haskell library
Acknowledgements
- Thanks to @fycth, @kahlil_va, @louiswu, and @sanchayan_maity for reading early drafts of this tutorial and giving feedback.
- Thanks to @mrkkrp for responding quickly to mrkkrp/zip#64 and mrrkrp/zip#68, which I ran into while writing this tutorial.