For a while we’ve used a setup where multiple serverless files use the same Api Gateway and share authorizers that are defined in a separate cloudformation stack. We’ve used authorizer type = “CUSTOM” and an authorizerId to point to an existing authorizer, but upon upgrading to serverless v2 I get an error saying: Configuration warning at 'functions.get.events[0].http.authorizer.type': unsupported configuration format
Type
The type of authorizer. Valid values include:
* TOKEN: A custom authorizer that uses a Lambda function.
* COGNITO_USER_POOLS: An authorizer that uses Amazon Cognito user pools.
* REQUEST: An authorizer that uses a Lambda function using incoming request parameters.
@bfieber thanks for the reply! As far as I can understand those types go for the actual authorizer, where the config I mentioned is where you reference an authorizer to be used for a specific Method. See the link in the bottom of my post.
@jayceesnow Unfortunately I didn’t find a way passed this (other than turning of all validation using configValidationMode: error). Thanks anyway for confirming that I’m not the only one struggling with this. I guess the right way forward would be to make an issue / a PR in the serverless repo.
Looks like a potential bug in the SLS code.
In v2.5.0 and below, it would pass the CUSTOM type along silently and AWS CFn would allow it.
As of v2.6.0 they added JSON-Schema validation of the type that doesn’t include CUSTOM as a valid option.
But looking at the docs you linked and the fact that it’s just a warning, it seems to be an incorrect warning.
Does the service still deploy event with the warning?