How to add a Lambda layer to my API Gateway’s authorizer function in Terraform?
Using the Terraform provider hashicorp/aws
, I have provisioned an API gateway (aws_apigatewayv2_api
) that uses an authorizer Lambda function (aws_apigatewayv2_authorizer
). I also have a Lambda layer (aws_lambda_layer_version
) that contains reusable code.
How to add a Lambda layer to my API Gateway’s authorizer function?
I have an API gateway that uses an “authorizer” Lambda function. Is it possible to pull in reusable code (e.g., shared functions, constants) from a Lambda layer to the authorizer function?