I am using AWS API Gateway request validation feature for my APIs. You can check more details in the documentation here. To deploy the API, I am using the serverless framework. Following is a snippet from the serverless.yml.
resources:
Resources:
ParameterRequestValidator:
Type: AWS::ApiGateway::RequestValidator
Properties:
Name: ParameterRequestValidator
RestApiId:
Ref: ApiGatewayRestApi
ValidateRequestBody: true
ValidateRequestParameters: false
The endpoints are backed by lambda functions and are defined as follows:
functions:
configs-create:
handler: src.handlers.configs.create.handler
events:
- http:
path: /configs
method: post
cors: true
reqValidatorName: ParameterRequestValidator
request:
schema:
application/json: ${file(src/handlers/schemas/config_create.json)}
As of now, I have 8 entities with 5 endpoints for each REST method - POST, GET ID, GET All, PUT, PATCH. Out of these, the request validator has been attached to the methods POST, PUT and PATCH. Hence, there are total 24 endpoints that use the request validator.
On running serverless deploy, I get the following error message:
Serverless Error ---------------------------------------
An error occurred: ApiGatewayMethodMeasurementDashlocationsIdVarPutValidator - Maximum number of Request Validators for this API has been reached. (Service: AmazonApiGateway; Status Code: 429; Error Code: LimitExceededException; Request ID: xxxx; Proxy: null).
The Quotas Documentation page does not mention a specific limit on the number of Request Validators. Also, I intend to have more methods, however, seems like I have already hit the limit with 24 functions using the request validator.
How can I get around this limit and ensure the serverless deploy command does not fail? Also, does anybody know how many request validators are allowed?
Help would be much appreciated! Thanks in advance!