Hello,
I am sitting behind a proxy at work and want to deploy some demo functions to evaluate serverless.
Can I configure a proxy somewhere in the framework to make it work through our proxy?
Cheers
Hello,
I am sitting behind a proxy at work and want to deploy some demo functions to evaluate serverless.
Can I configure a proxy somewhere in the framework to make it work through our proxy?
Cheers
You should be able to set the HTTP_PROXY
and/or HTTPS_PROXY
environment variables and have it work (see the lib/plugins/aws/provider/awsProvider.js
file for the specific handler code, if you’re interested).
Replying to a very old topic, but I encounter the same problem as @plhmhck.
Setting HTTP_PROXY
and/or HTTPS_PROXY
seem to have no effect, and inspecting the mentioned awsProvider.js
file I can’t see anything about proxy variables.
I tried also with a local cntlm proxy before reaching to the corporate proxy, to see the network traffic. But nothing shows up in the cntlm logs. So, where I have to specify my proxy settings for the sls framework?
On another machine with direct internet connection sls deploy
works perfectly. But behind our corporate proxy the deployment fails with:
Error:
Inaccessible host: `cloudformation.eu-central-1.amazonaws.com' at port `undefined'. This service may not be available in the `eu-central-1' region.
Thanks for any hint!
I found it!
When I prefix the value of HTTP_PROXY
and HTTPS_PROXY
with http://
then the proxy settings work as expected. I’m just wondering why other applications (eg aws cli and curl) don’t need this protocol prefix.
Now I’m one step further… next error is: unable to get local issuer certificate (because the proxy does ssl inspection)
Other users seem to have the same problem, but no solution yet: