DEV Community

Discussion on: Reduce Lambda invocations and code boilerplate by adding a JSON Schema Validator to your API Gateway

Collapse
 
dvddpl profile image
Davide de Paolis

SchemaValidator is a property/setting of the APIGateway not of the Lambda, so having a Lambda in a different stack, makes no difference.
In the stacks where the lambda is defined there will be no mention of the gateway api. In the stack where you create the gateway api, yes, you need to reference/import you lambda in order to create the lambdaIntegration.

new apigateway.LambdaIntegration(myLambda)