{"id":16726878,"url":"https://github.com/lpil/purescript-aws-lambda-express","last_synced_at":"2026-03-06T20:32:31.324Z","repository":{"id":58242400,"uuid":"109451864","full_name":"lpil/purescript-aws-lambda-express","owner":"lpil","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-19T14:02:29.000Z","size":16,"stargazers_count":23,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-07T15:42:57.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-03T23:34:21.000Z","updated_at":"2024-04-12T04:23:58.000Z","dependencies_parsed_at":"2022-08-31T01:00:11.627Z","dependency_job_id":null,"html_url":"https://github.com/lpil/purescript-aws-lambda-express","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/lpil/purescript-aws-lambda-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fpurescript-aws-lambda-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fpurescript-aws-lambda-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fpurescript-aws-lambda-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fpurescript-aws-lambda-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpil","download_url":"https://codeload.github.com/lpil/purescript-aws-lambda-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fpurescript-aws-lambda-express/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30196173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T22:54:55.711Z","updated_at":"2026-03-06T20:32:31.307Z","avatar_url":"https://github.com/lpil.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purescript-aws-lambda-express\n\nCatchy name, no?\n\nThis library make it easy to deploy a web app written with\n[purescript-express][ps-express] to [AWS Lambda][aws-lambda], Amazon's\nserverless compute service. Under the hood it uses Amazon's\n[aws-serverless-express][aws-s-e].\n\n[ps-express]: https://github.com/nkly/purescript-express\n[aws-lambda]: https://aws.amazon.com/lambda\n[aws-s-e]: https://github.com/awslabs/aws-serverless-express\n\n\n## Show me how it works\n\n```sh\nbower install --save purescript-aws-lambda-express purescript-express\nnpm install --save aws-serverless-express express\n```\n\n```purescript\nmodule Main where\n\nimport Node.Express.App (App, get)\nimport Node.Express.Handler (Handler)\nimport Node.Express.Response (sendJson)\nimport Network.AWS.Lambda.Express as Lambda\n\n-- Define an Express web app\n\nindexHandler :: Handler\nindexHandler = do\n  sendJson { status: \"ok\" }\n\napp :: App\napp = do\n  get \"/\" indexHandler\n\n-- Define the AWS Lambda handler\n\nhandler :: Lambda.HttpHandler\nhandler =\n  Lambda.makeHandler app\n```\n\nNow compile the application for use within Node JS, zip it up, and upload it\nto AWS Lambda specifying `Main.handler` as the handler string.\n\nFYI AWS Lambda really doesn't like directory names with `.`s in them and will\nthrow a cryptic error, so best avoid a Purescript subdirectory. I lost an\nevening to this. 😓\n\n\n## Why deploy a web app this way?\n\n- No infrastructure to manage or maintain.\n- Scaling takes seconds and handled automatically.\n- Pay per request, no money wasted on idle servers.\n- AWS's free quota is enough for low traffic apps.\n- Free monitoring and other goodies out the box.\n\n## Why not?\n\n- Dedicated servers may be cheaper for high traffic apps.\n- With infrequent traffic [cold starts][cold-starts] can impact response time.\n- Compiling native extensions can be fiddly.\n- Any in-memory or on-filesystem state is ethereal and may be deleted between requests.\n\n[cold-starts]: https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/\n\n\n## Is this ready for production?\n\nI've used AWS Lambda for production workloads since 2016.\n\nOr do you mean this library? Read the source, it's very small.\n\n\n## What's the easiest way to deploy code to AWS Lambda?\n\nFor automation of building zipping and uploading the application I have been\nusing the [Serverless Framework][serverless-framework], which is friendlier\nthan using the AWS API directly. This repository contains an example of it in\nuse. See the `Makefile` and `test/Main.purs` for details.\n\n[serverless-framework]: https://serverless.com/framework\n\n\n## LICENCE\n\nCopyright © 2017 - present Louis Pilfold. All Rights Reserved.\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at http://mozilla.org/MPL/2.0/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fpurescript-aws-lambda-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpil%2Fpurescript-aws-lambda-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fpurescript-aws-lambda-express/lists"}