Forum Discussion

sarmasarma's avatar
sarmasarma
New Contributor
6 years ago

Lambda integration fails quietly - with Security YAML elements

Please note my API is at:-

https://api.swaggerhub.com/apis/org.ASUX.playground/my-petstore_open_api_2_0/1.0.1-OpenAPI2.0

 

I tried using Lambda Integration, but it quietly fails (no error message, no success message).

This happened Again - after taking input from case 00338994.

Then, I switched to plain-vanilla AWS-ApiGateway integration.

At least this time, I get a blue-box message saying "executed", but nothing shows up on AWS - even for plain-vanilla AWS integration.

 

To make sure I had a good API defimed - I copied and pasted the Swagger2.0 -- directly / manually into AWS API-Gateway.

I got *NO* errors and just 4 warnings.

  • API Key security definition 'MyownAK' has unexpected name or location. Ignoring.
  • Unsupported security definition type 'basic' for 'petstore_auth'. Ignoring.
  • Parameter type formData for parameter name not supported. Ignoring.
  • Parameter type formData for parameter file not supported. Ignoring.

HERE's The BIG PROBLEM:-

AWS API-Gateway gives warnings for  securityDefinitions, but accepts securitySchemas (like OAS3.0 does), while SwaggerHub does the opposite (it rightly requires securityDefinitions).

AWS API-Gateway gives warnings for formData, but accepts body (like OAS3.0 does), while SwaggerHub does Not accept body.

 

QUESTION 1:- What am I supposed to do?  If I edit the YAML to meet AWS API-Gateway rules, then SwaggerHub editor shows errors!

QUESTION 2:- Do you folks have any WORKING examples with AWS  -- with securityDefinitions in OpenAPI2.0 -- that you can provide to us - so we can replicate that success with Lambda-integration?

 

Thanks in advance!