A monorepo for the Lambda@Edge Authorizer library, designed to be dropped into your Lambda@Edge functions.
Package |
---|
lambda-edge-authorizers |
lambda-example-auth0 |
lambda-private-site |
There are known restrictions on all edge functions & Lambda@Edge functions, details include:
Environment variables cannot be set on Lambda@Edge functions.
- Default env vars bundled into the Lambda runtime are still present.
- Therefore, you should bundle your Lambda functions with secrets baked in, and restrict access to those functions as appropriate.
When removing Lambda@Edge functions:
- You must remove the function from all Cloudfront distributions.
- Wait a few hours for the edge replicas to be automatically deleted.
- Then delete your Lambda function.
- Therefore,
RETAIN
all functions in IaC code & manually clean them up post-deployment.
This repository has a small collection of example packages for inspiration, prefixed with lambda-example-*
.
- These packages, although deployed to Lambda@Edge, are built with
aws-cdk
to ensure their "environment variables" are bundled correctly. - Review their
.env.example
for more details.