By using AWS re:Post, you agree to the Terms of Use

API Gateway integration random status 500



We're experiencing random errors 500 in the calls to our API for which we cannot figure out the source. The same request would more or less fail one out of each five times with this error: {"message": "Internal server error"}

In the logs we can see that everything is fine, the ECS container even handles the request properly but in the API Gateway logs we find this line:
Thu Nov 14 10:46:04 UTC 2019 : Execution failed due to configuration error: Not a valid protocol version: {}HTTP/1.1 204 No Content

We have the following setup:
API Gateway --> VPC Link --> NLB --> TargetGroup --> ECS

Querying directly the ECS service or the NLB as mentioned before works as expected, the responses are always the same expected result.

Is there anything we should take into account when integration API Gateway through a VPC link? I couldn't find any entry anywhere for the error "Not a valid protocol version" nor any hints on how to debug it.


Edited by: catchoom on Nov 14, 2019 3:38 AM

asked 3 years ago262 views
1 Answer

In the end, we solved the issue by placing an HTTP Proxy between the NLB and an ALB, which routes the requests to the desired ECS containers by hostname.

API Gateway --> VPC Link --> NLB --> NGINX --> ALB TargetGroup --> ECS

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions