{"id":37019255,"url":"https://github.com/markosski/lambdaweb4s","last_synced_at":"2026-01-14T02:05:19.052Z","repository":{"id":65509030,"uuid":"553834143","full_name":"markosski/lambdaweb4s","owner":"markosski","description":"Library for building serverless web APIs on AWS Lambda","archived":false,"fork":false,"pushed_at":"2022-10-29T18:46:19.000Z","size":26,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-05-25T23:32:36.216Z","etag":null,"topics":["aws-lambda","rest-api","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markosski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-18T21:06:07.000Z","updated_at":"2022-11-13T04:08:46.000Z","dependencies_parsed_at":"2023-01-26T16:40:12.332Z","dependency_job_id":null,"html_url":"https://github.com/markosski/lambdaweb4s","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/markosski/lambdaweb4s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosski%2Flambdaweb4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosski%2Flambdaweb4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosski%2Flambdaweb4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosski%2Flambdaweb4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markosski","download_url":"https://codeload.github.com/markosski/lambdaweb4s/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosski%2Flambdaweb4s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aws-lambda","rest-api","scala"],"created_at":"2026-01-14T02:05:18.506Z","updated_at":"2026-01-14T02:05:19.044Z","avatar_url":"https://github.com/markosski.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambdaweb4s\n\n**lambdaweb4s** is a lightweight library that bridges multiple AWS web integrations into single \nresponse/request model. The benefits of this approach are the following:\n\n* convenient pattern matching syntax to map request to response objects\n* zero dependency built-in development web server to test lambda locally\n* lambda can be deployed in front of ALB or API Gateway without any change to source code\n\n## Coordinates\n\nhttps://repo1.maven.org/maven2/io/github/markosski/lambdaweb4s_2.13/\n\n## Usage\n\nAdd `lambdaweb4s` dependency to your build system and create class that extends `LambdaWebHandler`. \nWhen deploying to AWS, configure your lambda function to be backed either by Application Load Balancer or API Gateway in passthrough mode. When executed locally, built-in web server will start up that you can use to test your application endpoints locally.\n\n\n```scala\nimport lambdaweb4s.models.Methods._\nimport lambdaweb4s.LambdaWebHandler\nimport lambdaweb4s.DevWebServer\nimport lambdaweb4s.models._\nimport lambdaweb4s.models.Path.Root\nimport lambdaweb4s.models.Codes._\n\nclass Handler extends LambdaWebHandler {\n  def accountInfo(accountId: String): Response = {\n    Response.ok(s\"Info for account: $accountId\")     \n  }\n\n  def routes = {\n    case GET -\u003e Root =\u003e Response.ok(\"Hello World\")\n    case GET -\u003e Root / \"_health\" =\u003e Response.ok(\"healthy\")\n    case GET -\u003e Root / \"accounts\" / accountId / \"info\" =\u003e accountInfo(accountId)\n    case _ =\u003e Response.text(NOT_FOUND, \"page not found\")\n  }\n}\n\nobject Handler extends App {\n  val server = new DevWebServer(new Handler)\n  server.listen(8080)\n}\n```\n\n## Run Example with SBT\n\n`sbt \"project example; run\"`\n\n## Run Locally\n\nAfter building uber jar with build plugin of your choice you can run lambda app locally\n\n`java -jar application.jar`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkosski%2Flambdaweb4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkosski%2Flambdaweb4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkosski%2Flambdaweb4s/lists"}