{"id":19884892,"url":"https://github.com/twihike/nestjs-lambda-starter","last_synced_at":"2026-05-08T14:44:41.139Z","repository":{"id":38426356,"uuid":"279080145","full_name":"twihike/nestjs-lambda-starter","owner":"twihike","description":"🚀 Nest framework starter with AWS Lambda","archived":false,"fork":false,"pushed_at":"2023-01-24T04:34:41.000Z","size":3132,"stargazers_count":2,"open_issues_count":14,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-01T03:43:33.146Z","etag":null,"topics":["amplify","aws","aws-lambda","lambda","nest","nestjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twihike.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":"2020-07-12T14:21:54.000Z","updated_at":"2024-06-09T08:34:41.000Z","dependencies_parsed_at":"2023-02-13T17:30:41.017Z","dependency_job_id":null,"html_url":"https://github.com/twihike/nestjs-lambda-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twihike/nestjs-lambda-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twihike%2Fnestjs-lambda-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twihike%2Fnestjs-lambda-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twihike%2Fnestjs-lambda-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twihike%2Fnestjs-lambda-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twihike","download_url":"https://codeload.github.com/twihike/nestjs-lambda-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twihike%2Fnestjs-lambda-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263279275,"owners_count":23441682,"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","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":["amplify","aws","aws-lambda","lambda","nest","nestjs"],"created_at":"2024-11-12T17:30:33.745Z","updated_at":"2026-05-08T14:44:36.097Z","avatar_url":"https://github.com/twihike.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nestjs-lambda-starter\n\n[![CI status](https://github.com/twihike/nestjs-lambda-starter/workflows/ci/badge.svg)](https://github.com/twihike/nestjs-lambda-starter/actions)\n\n[NestJS](https://github.com/nestjs/nest) framework starter with AWS Lambda.\n\n## Related projects\n\n- [nest-starter](https://github.com/twihike/nestjs-starter)\n\n## How to use with Amplify\n\nAdd API and Function.\n\n```shell\ncd \u003camplify-project\u003e\namplify add api\n```\n\n```text\n? Please select from one of the below mentioned services: REST\n? Provide a friendly name for your resource to be used as a label for this category in the project: apixxxxxxxx\n? Provide a path (e.g., /book/{isbn}): /api\n? Choose a Lambda source Create a new Lambda function\n? Provide a friendly name for your resource to be used as a label for this category in the project: examplexxxxx\n? Provide the AWS Lambda function name: examplexxxxx\n? Choose the function runtime that you want to use: NodeJS\n? Choose the function template that you want to use: Serverless ExpressJS function (Integration with API Gateway)\n? Do you want to access other resources created in this project from your Lambda function? No\n? Do you want to invoke this function on a recurring schedule? No\n? Do you want to edit the local lambda function now? Yes\nSuccesfully added the Lambda function locally\n? Restrict API access Yes\n? Who should have access? Authenticated users only\n? What kind of access do you want for Authenticated users? create, read, update, delete\n? Do you want to add another path? No\nSuccessfully added resource apifefce8b8 locally\n\nSome next steps:\n\"amplify push\" will build all your local backend resources and provision it in the cloud\n\"amplify publish\" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud\n```\n\nConfigure lambda handler and environment variables.\n\n```shell\ncd \u003camplify-project\u003e/amplify/backend/function/\u003cfunction-name\u003e\nvi \u003cfunction-name\u003e-cloudformation-template.json\n```\n\n```diff\ndiff --git a/\u003cfunction-name\u003e-cloudformation-template.json b/\u003cfunction-name\u003e-cloudformation-template.json\n--- a/\u003cfunction-name\u003e-cloudformation-template.json\n+++ b/\u003cfunction-name\u003e-cloudformation-template.json\n@@ -30,7 +30,7 @@\n             \"aws:asset:property\": \"Code\"\n           },\n           \"Properties\": {\n-            \"Handler\": \"index.handler\",\n+            \"Handler\": \"dist/index.handler\",\n             \"FunctionName\": {\n                 \"Fn::If\": [\n                     \"ShouldNotCreateEnvResources\",\n@@ -53,11 +53,16 @@\n             \"Environment\": {\n                 \"Variables\" : {\n                     \"ENV\": {\n                         \"Ref\": \"env\"\n                     },\n                     \"REGION\": { \n                         \"Ref\": \"AWS::Region\"\n-                    }\n+                    },\n+                    \"NODE_ENV\": \"production\",\n+                    \"TYPEORM_HOST\": \"your db host\",\n+                    \"TYPEORM_USERNAME\": \"your username\",\n+                    \"TYPEORM_PASSWORD\": \"your password\",\n+                    \"TYPEORM_DATABASE\": \"your db name\"\n\n                 }\n             },\n```\n\nClone starter repository.\n\n```shell\ncd \u003camplify-project\u003e/amplify/backend/function/\u003cfunction-name\u003e\nrm -rf src\ngit clone https://github.com/twihike/nestjs-lambda-starter.git src\ncd src\nrm -rf .git\nyarn install\n```\n\nRun `amplify-push.sh` to do the following:\n\n- Compile to JavaScript.\n- Install only the production packages used by lambda.\n- Run `amplify push`.\n\n```shell\n# requires jq and docker\ncd \u003camplify-project\u003e/amplify/backend/function/\u003cfunction-name\u003e/src\n./scripts/amplify-push.sh\n```\n\n## Running the app\n\n```shell\n# development\nyarn run start\n\n# watch mode\nyarn run start:dev\n\n# production mode\nyarn run start:prod\n```\n\n## Test\n\n```shell\n# unit tests\nyarn run test\n\n# e2e tests\nyarn run test:e2e\n\n# test coverage\nyarn run test:cov\n```\n\n## DB migration\n\n```shell\n# generate\nyarn run migration:generate \u003cname\u003e\n\n# show all migrations\nyarn run migration:show\n\n# run\nyarn run migration:run\n\n# dry run\nyarn run schema:log\n\n# revert\nyarn run migration:revert\n```\n\n## Documentation\n\n```shell\nyarn run doc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwihike%2Fnestjs-lambda-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwihike%2Fnestjs-lambda-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwihike%2Fnestjs-lambda-starter/lists"}