Skip to content

Latest commit

 

History

History

README.md

AWS APIgateway Auth0

This sample deploys an API Gateway REST endpoint protected by a custom Lambda authorizer.

It creates:

  • an API endpoint at /hello
  • a Lambda-backed request authorizer
  • a protected route that returns a simple HTML response when authorization succeeds

The project is based on an Auth0-style custom authorizer flow and is useful for local testing of token-based API access patterns.

Prerequisites

Start LocalStack

export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
localstack auth set-token $LOCALSTACK_AUTH_TOKEN
localstack start -d
localstack wait -t 30

Run the Sample

npm install
pulumilocal stack init dev
pulumilocal config set aws:region us-east-1
pulumilocal up

After deployment, run pulumilocal stack output url to get the API URL and test it with an Authorization header expected by the authorizer logic.