Another quick one! I thought I’d sit down and figure out how to run some Haskell code in AWS Lambda. I took a look at the serverless-haskell package and thought I’d show you the fruits of my investigation. My project makes uses of the
AWSHaskell module from serverless-haskell but dispenses with all the npm stuff. Right now, you just run the
pkg script which will generate a zip archive in the right format for AWS Lambda which you can then upload. Note that you’ll need to build on Linux to generate compatible binaries for use on Lambda. Done.
.zipfile can be uploaded using awscli
You can also check out my fully working project.
Content © 2010–2021 Richard Cook. All rights reserved.