{"id":31556319,"url":"https://github.com/having-fun-serverless/web-adapter-example","last_synced_at":"2025-10-04T22:52:38.114Z","repository":{"id":140835562,"uuid":"583662209","full_name":"having-fun-serverless/web-adapter-example","owner":"having-fun-serverless","description":"A working example using Amplification and the AWS Web Adapter extension","archived":false,"fork":false,"pushed_at":"2023-01-05T07:14:23.000Z","size":374,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-05T18:39:54.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/having-fun-serverless.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-30T13:43:31.000Z","updated_at":"2024-04-05T18:39:56.164Z","dependencies_parsed_at":"2024-04-05T18:50:15.972Z","dependency_job_id":null,"html_url":"https://github.com/having-fun-serverless/web-adapter-example","commit_stats":null,"previous_names":["having-fun-serverless/web-adapter-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/having-fun-serverless/web-adapter-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/having-fun-serverless%2Fweb-adapter-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/having-fun-serverless%2Fweb-adapter-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/having-fun-serverless%2Fweb-adapter-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/having-fun-serverless%2Fweb-adapter-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/having-fun-serverless","download_url":"https://codeload.github.com/having-fun-serverless/web-adapter-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/having-fun-serverless%2Fweb-adapter-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386109,"owners_count":25978109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2025-10-04T22:52:33.484Z","updated_at":"2025-10-04T22:52:38.102Z","avatar_url":"https://github.com/having-fun-serverless.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"300\" height=\"300\" src=\"images/logo.png\"\u003e\n\n\u003ch3 align=\"center\"\u003eAmplification + AWS Lambda Adapter\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/awslabs/aws-lambda-web-adapter\"\u003eAWS Lambda Adapter\u003c/a\u003e is the best kept secret that you can use in order to migrate non-lambda native application to the Lambda world. \n    The following repo shows an example of using a Nest based application created with \u003ca href=\"https://amplication.com\"\u003eAmplication\u003c/a\u003e which is connected to a RDS database and exposed\n    to the outside world using Lambda URL and a Lambda Web Adapter.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/aws-hebrew-book/web-adapter-example/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/aws-hebrew-book/web-adapter-example/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#high-level-architecture\"\u003eHigh level architecture\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#testing\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#logo\"\u003eLogo\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n## High level architecture\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"images/amplication.png\" alt=\"Architecture diagram\"\u003e\n\u003c/div\u003e\n\n1. A NestJS application created with the Amplication development tool. \n2. The application runs inside a Lambda using a docker image created by Amplication.\n3. The Lambda is connected to the outside world using Lambda URL functionality.\n4. And it's located inside a private subnet with an access to an RDS database.\n\n\n## Getting started\n### Prerequisites\n* Make sure your machine is ready to work with [AWS SAM](https://aws.amazon.com/serverless/sam/)\n\n### Installation\n* Clone this repository.\n* Run `sam build` and then `sam deploy --guided`.\n* Choose user name and password for the DB.\n* Make sure you a key pair for the bastion station.\n* The Lambda URL has no authentication on purpose, the authentication is being handled by NestJS.\n\n### Testing\n* Access the Lambda URL end point and append `/api`, for example `https://****.lambda-url.us-east-1.on.aws/api`. \n* Authorize using `admin` as user and password, and make a call.\n\n![service-running](https://user-images.githubusercontent.com/110536677/210722938-1666f737-bff2-4ffc-beff-0dcacba21467.png)\n\n## Landmarks\n* Defining the extension to be part of your docker file - https://github.com/aws-hebrew-book/web-adapter-example/blob/f787c8c8689259132db70b48b817da16217a5b7b/server/Dockerfile#L28\n* NestJS application runs on port 8080 - https://github.com/aws-hebrew-book/web-adapter-example/blob/f787c8c8689259132db70b48b817da16217a5b7b/server/template.yaml#L206\n* Authentication handled by NestJS - https://github.com/aws-hebrew-book/web-adapter-example/blob/f787c8c8689259132db70b48b817da16217a5b7b/server/template.yaml#L210\n* Initial DB migration - https://github.com/aws-hebrew-book/web-adapter-example/blob/f787c8c8689259132db70b48b817da16217a5b7b/server/template.yaml#L125\n* Using secret manager to save credentials - https://github.com/aws-hebrew-book/web-adapter-example/blob/f787c8c8689259132db70b48b817da16217a5b7b/server/template.yaml#L164\n* **Anti Pattern** Embedding the credentials as part of UserData, this solution is quick and dirty, use SecretsManager - https://github.com/aws-hebrew-book/web-adapter-example/blob/f787c8c8689259132db70b48b817da16217a5b7b/server/template.yaml#L124\n\n\n### Monitoring\nMonitoring is done by using [Lumigo](https://platform.lumigo.io/auth/signup)\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the Apache License Version 2.0 License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nEfi Merdler-Kravitz - [@TServerless](https://twitter.com/TServerless)\n\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaving-fun-serverless%2Fweb-adapter-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaving-fun-serverless%2Fweb-adapter-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaving-fun-serverless%2Fweb-adapter-example/lists"}