1

Is it possible for AWS API Gateway to validate an HTTP API's incoming payloads before it executes the Lambda function, saving the expense of calling a Lambda function when the input is invalid?

I'm aware that the older REST API's can have their input validated by API Gateway, but I'm using HTTP APIs because they are lighter and 71% less expensive and fit my needs very well.

Any suggestions/workarounds very welcome.

1 Answers1

1

No its not possible. Only REST api support validation:

enter image description here

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • @Hcaertnit So use rest then if this is a must have feature. Price difference between http and rest is there because REST is much more future rich then http. – Marcin Jul 19 '21 at 01:44
  • 1
    Well, I think using my own custom validators first thing inside the Lambda function will be more cost efficient than the REST APIs, no? Anyway, it's not controversial for me. The lightness and singleness-of-purpose of the HTTP APIs is attractive to me as well. –  Jul 19 '21 at 01:47