AWS Lambda Authorizer for API Gateway that checks for a secret in a custom header.
This lambda requires a few environment variables:
HEADER_KEY
: The value of this variable is the name of the HTTP header that the lambda will check.HEADER_VALUE_PARAMETER
: The value of this variable is the name of an SSM Parameter containing the secret that the lambda will look for in the specified header.
It also accepts an optional environment variable:
PRINCIPAL_ID
: The value to use for theprincipalId
field in the lambda output. Defaults touser
.
The SSM parameter specified in HEADER_VALUE_PARAMETER
must exist with the
correct value for the lambda to work.
The IAM role assigned to the lambda must have permissions to get and decrypt this SSM parameter.
Andre Silva - @andreswebs
This project is licensed under the Unlicense.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html