I have a Lambda with an API Gateway trigger that accepts an HTTP POST and returns a JSON response. Runtime is Node.js 12.x.
When I invoke this lambda using the httpie tool (httpie.org), response time is within a second. When I invoke this lamdda using curl, wget or from chrome (using XMLHttpRequest), response time is around 8 seconds.
AWS Lambda Insights an XRay report the following durations: With curl, wget or chrome:
- Invocation: 8,44s
- Overhead: 19ms
With httpie.org
- Invocation: 110ms
- Overhead: 57ms
I reproduced the request chrome sends with http using Chrome's 'copy as curl' in the devtools, and posted all the headers using httpie.org