I’m using API Gateway v2 HTTP API and following this documentation
I keep getting the following error whenever I try to create a lambda request authorizer
Error: The CloudFormation template is invalid: [/Resources/HttpApiAuthorizerCustomAuthorizer/Type/IdentitySource/0] ‘null’ values are not allowed in templates
# serverless.yml
provider:
httpApi:
authorizers:
customAuthorizer:
type: request
functionName: authorizerFunc
functions:
authorizerFunc:
name: authorizer-${opt:account}-${opt:stage}
handler: authorizer.handler
package:
include:
- ./authorizer.js
helloWorld:
name: helloWorld-${opt:account}-${opt:stage}
package:
include:
- ./helloWorld.js
handler: helloWorld.handler
events:
- httpApi:
path: /hello
method: "*"
authorizer:
name: customAuthorizer
If I add the identitySource
under the customAuthorizer
, it will error out with something JWT related… which is not what I want:
Error: The CloudFormation template is invalid: [/Resources/HttpApiAuthorizerCustomAuthorizer/Type/JwtConfiguration/Audience/0] ‘null’ values are not allowed in templates
My template is the same as the documentation, but it is still treated like it only supports JWT authorizers