Parameter Validation for AWS Api Gateway

旧街凉风 提交于 2019-12-12 02:49:14

问题


So I created a resource and a GET action on my Api Gateway. I correctly pass my url parameters through Method Execution and through Integration Request via Mapping Templates. Currently I am having my Api endpoint execute a Lambda function when hit and there are parameter validates in my Lambda function. I was hoping there would be a way for Api Gateway to tell me validate the url parameters for me. But I can't find any documentation or blog that teaches me how to do that. I heard in a previous post that this feature may come in later if people complain to AWS enough, but that was like last year.


回答1:


This is still on our backlog, we don't yet validate incoming parameters.

The feature request we have to is just validating that they are present. Basically you would say a parameter is required and then if the parameter was missing, API Gateway would reject the request before it reached the Lambda function.



来源:https://stackoverflow.com/questions/36461564/parameter-validation-for-aws-api-gateway

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!