{"id":18573153,"url":"https://github.com/localstack-samples/lambda-sam-authorizer","last_synced_at":"2025-05-15T23:12:48.769Z","repository":{"id":221073330,"uuid":"753357913","full_name":"localstack-samples/lambda-sam-authorizer","owner":"localstack-samples","description":"AWS Serverless Application Model (SAM) with LocalStack Lambda and Authorizer","archived":false,"fork":false,"pushed_at":"2024-02-16T05:41:41.000Z","size":254,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-15T23:12:43.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/localstack-samples.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T00:33:42.000Z","updated_at":"2024-02-06T00:45:33.000Z","dependencies_parsed_at":"2024-02-06T02:42:01.704Z","dependency_job_id":"111757e1-8f52-4729-b725-899f610358ba","html_url":"https://github.com/localstack-samples/lambda-sam-authorizer","commit_stats":null,"previous_names":["localstack-samples/lambda-sam-authorizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-sam-authorizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-sam-authorizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-sam-authorizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-sam-authorizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localstack-samples","download_url":"https://codeload.github.com/localstack-samples/lambda-sam-authorizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436950,"owners_count":22070949,"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-06T23:08:13.868Z","updated_at":"2025-05-15T23:12:48.701Z","avatar_url":"https://github.com/localstack-samples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Serverless Application Model (SAM) with LocalStack Lambda and Authorizer\nDemonstrates how to use AWS SAM with LocalStack to create a Lambda function and an API Gateway with an authorizer.\n\n![Architecture](./docs/img/design.drawio.png \"Architecture\")\n\n## Prerequisites\n\n* LocalStack\n* Docker\n* `make`\n* [`awslocal`](https://github.com/localstack/awscli-local)\n* [`samlocal`](https://github.com/localstack/aws-sam-cli-local)\n* NodeJS 18.x\n* [`ulid`](https://www.npmjs.com/package/ulid)\n\n## Installing\n\nSetup [Serverless Application Model (SAM)](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) and [AWS SAM CLI Local](https://github.com/localstack/aws-sam-cli-local) on your local machine. We also recommend using NodeJS 14.x alongside a [Node Version Manager](https://github.com/nvm-sh/nvm) to manage your NodeJS versions.\n\nCreate a file named `.env-local` and put your LocalStack Auth Token in it. It is ignored by gitignore.\n```shell\nexport LOCALSTACK_AUTH_TOKEN=\u003cyour-token\u003e\u003e\n```\n\nStart LocalStack via:\n\n```sh \nlocalstack start -d\n```\n\n## Deploy the application\n\nLet us first install the local dependencies:\n\n```sh\nmake install\n```\n\nTo setup the infrastructure on LocalStack, run:\n\n```sh\nmake deploy\n```\n\nYou will be prompted to enter a name for the stack. Use the default options for the prompts and fill `Y` (`Yes`) for the confirmation prompt. The stack will be created and the output will be printed to the console.\n\n\nAfter deploying, you can invoke the Lambda function using the following commands:\n```sh\nmake invoke-allow\nmake invoke-deny\nmake invoke-unauthorized\nmake invoke-none\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack-samples%2Flambda-sam-authorizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalstack-samples%2Flambda-sam-authorizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack-samples%2Flambda-sam-authorizer/lists"}