Http connection is abruptly closed on calling /organizations POST endpoint from AWS Lambda

I am trying to create an organization from an AWS Lambda function using the api. It works properly when we run the same function from any other place (dev machine). I tried it using the pipedrive node js client and also using a normal rest client too.
I get the following error when I await the promise using needle http client.

 Error: socket hang up
at createHangUpError (_http_client.js:299:15)
at TLSSocket.socketCloseListener (_http_client.js:331:23)
at emitOne (events.js:121:20)
at TLSSocket.emit (events.js:211:7)
at _handle.close (net.js:567:12)
at TCP.done [as _onclose] (_tls_wrap.js:356:7)

What TLS version are you using? We deprecated older versions in January and we now only support TLS 1.2. That could be the issue… :thinking:

But It works well with GET endpoints, I could fetch orgs, deals etc. Only while creating an org, I am facing this issue.

I’m trying to help you :smiley:
Let’s rule out the TLS, first, so we can see what’s going on.

What TLS version are you using?