{"id":19709969,"url":"https://github.com/cbschuld/lambda-app","last_synced_at":"2026-05-12T22:32:26.956Z","repository":{"id":65525266,"uuid":"510211992","full_name":"cbschuld/lambda-app","owner":"cbschuld","description":"Lambda App - Opinionated Lambda App Initialization, Management and Response System","archived":false,"fork":false,"pushed_at":"2022-09-08T20:51:23.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T12:41:12.289Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbschuld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-07-04T04:31:36.000Z","updated_at":"2023-03-09T01:32:34.000Z","dependencies_parsed_at":"2023-01-27T08:15:47.964Z","dependency_job_id":null,"html_url":"https://github.com/cbschuld/lambda-app","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbschuld%2Flambda-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbschuld%2Flambda-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbschuld%2Flambda-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbschuld%2Flambda-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbschuld","download_url":"https://codeload.github.com/cbschuld/lambda-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241026874,"owners_count":19896716,"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":[],"created_at":"2024-11-11T22:05:35.788Z","updated_at":"2026-05-12T22:32:21.935Z","avatar_url":"https://github.com/cbschuld.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda App - Opinionated Lambda App Initialization, Management and Response System\n\nA simplistic and opinionated way to initialize a lambda-based application on AWS, log consistently to CloudWatch and respond to requests from users. The Lambda App system is designed to help minimize app-start and app-response code in serverless applications both through frameworks like serverless.com or the AWS CDK.\n\n## Example Usage\n\nsimplistic construction and response\n\n```typescript\nexport const main: APIGatewayProxyHandlerV2 = async (event, context) =\u003e {\n  const app = new App()\n  return app.response(HttpStatus.OK)\n}\n```\n\n## Identity Management\n\nIdentity request is called by the App runtime via overloading the function `onLoadIdentity`. It is called when the user invokes `init()` from the App instance.\n\n```typescript\nclass MyApp extends LambdaApp\u003c\n  MyIdentity,\n  APIGatewayEventRequestContextV2,\n  APIGatewayProxyEventV2WithRequestContext\u003cAPIGatewayEventRequestContextV2\u003e\n\u003e {\n  public async onLoadIdentity(request: APIGatewayEventRequestContextV2): Promise\u003cMyIdentity\u003e {\n    return Promise.resolve({\n      user: {\n        id: 'abc123',\n        first: 'John',\n        last: 'Doe'\n      },\n      company: 'Acme',\n      office: 'New York'\n    })\n  }\n}\n\nexport const main: APIGatewayProxyHandlerV2 = async (event, context) =\u003e {\n  return new MyApp()\n    .init({ event, context, options: { authorize: true } })\n    .then((app) =\u003e app.response(HttpStatus.OK))\n    .catch((app) =\u003e app.response(HttpStatus.Forbidden, { error: app.error.message }))\n}\n```\n\n## Tests\n\nTests are executed via Jest.\n\n```shell script\nnpm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbschuld%2Flambda-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbschuld%2Flambda-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbschuld%2Flambda-app/lists"}