[{"data":1,"prerenderedAt":49},["ShallowReactive",2],{"pattern-apigw-data-validation":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":28,"level":29,"meta":30,"patternArch":31,"resources":36,"s3URL":6,"services":6,"stem":44,"testing":45,"videoId":6,"__hash__":48},"patterns\u002Fpatterns\u002Fapigw-data-validation.json","Amazon API Gateway data validation",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Feric-johnson.json",{"text":13},[14],"sam deploy","This pattern creates an Amazon API Gateway that handles simple data validation at the endpoint without invoking the Lambda function when the data validation fails.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-data-validation","serverless-patterns\u002Fapigw-data-validation","apigw-data-validation","template.yaml",{"headline":25,"text":26},"How it works",[27],"The data model is declared in the API Gateway resource. The Lambda function then requires the request body to be validated against this model.","Python","300",{},{"icon1":32},{"x":33,"y":33,"service":34,"label":35},50,"apigw","Amazon API Gateway",{"bullets":37},[38,41],{"text":39,"link":40},"API Gateway model example","https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-resource-api.html#sam-api-models",{"text":42,"link":43},"JSON Schema","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-zyp-json-schema-04#section-4.1","patterns\u002Fapigw-data-validation",{"text":46},[47],"See the GitHub repo for detailed testing instructions.","t-1mmrkfFoc6tf5QeluDL8jC79lpXQoGhr2mLNLUOSY",1781519738237]