[{"data":1,"prerenderedAt":64},["ShallowReactive",2],{"pattern-apigw-data-validation-tf":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":30,"level":31,"meta":32,"patternArch":33,"resources":51,"s3URL":6,"services":6,"stem":59,"testing":60,"videoId":6,"__hash__":63},"patterns\u002Fpatterns\u002Fapigw-data-validation-tf.json","Amazon API Gateway data validation",null,{"text":8},[9,10],"\u003Ccode>terraform destroy\u003C\u002Fcode>","\u003Ccode>terraform show\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Fmakendran-g.json",{"text":14},[15,16],"terraform init","terraform apply","Creates an Amazon API Gateway with request validation, rejecting invalid requests before AWS Lambda invocation using model schema validation.","json","Terraform",{"template":21},{"repoURL":22,"templateURL":23,"projectFolder":24,"templateFile":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-data-validation-tf","serverless-patterns\u002Fapigw-data-validation-tf","apigw-data-validation-tf","main.tf",{"headline":27,"text":28},"How it works",[29],"The data model is declared in the API Gateway resource. The Lambda function then requires the request body to be validated against this model.","YAML","300",{},{"icon1":34,"icon2":38,"icon3":41,"line1":45,"line2":49},{"x":35,"y":36,"service":37},20,50,"icon-internet",{"x":36,"y":36,"service":39,"label":40},"apigw","Amazon API Gateway REST API",{"x":42,"y":36,"service":43,"label":44},80,"lambda","AWS Lambda",{"from":46,"to":47,"label":48},"icon1","icon2","validate",{"from":47,"to":50},"icon3",{"bullets":52},[53,56],{"text":54,"link":55},"Amazon API Gateway model example","https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-resource-api.html#sam-api-models",{"text":57,"link":58},"JSON Schema","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-zyp-json-schema-04#section-4.1","patterns\u002Fapigw-data-validation-tf",{"text":61},[62],"See the Github repo for detailed testing instructions.","Q3o057ZxJOWu0lwi9LbBPKckVdb1rCyWWzMtwfZDRGE",1781519738233]