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.
- A valid LocalStack for AWS license. Your license provides a
LOCALSTACK_AUTH_TOKEN. - Docker
localstackCLIawslocalCLI- Pulumi
pulumilocalCLImakeandjq
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
localstack auth set-token $LOCALSTACK_AUTH_TOKEN
localstack start -d
localstack wait -t 30npm install
pulumilocal stack init dev
pulumilocal config set aws:region us-east-1
pulumilocal upAfter deployment, run pulumilocal stack output url to get the API URL and test it with an Authorization header expected by the authorizer logic.