5

I am trying to deploy serverless application on AWS from my local machine.The machine is behind company firewall.

Initially I was getting connection error so I added http_proxy and https_proxy settings on terminal.

Now when I try to deploy I am constantly getting the error self signed certificate in certificate chain.

I have also created a certificate from puttygen and set the npm ca file path to it but all in vain.

My npm install works ,the only issue is with serverless deploy.

Not sure what to do next.

Thanks already for the help.

Error Screenshot

I have added the screenshot of the image if thats of any help.

emkarachchi
  • 750
  • 1
  • 7
  • 18
Sunaina
  • 61
  • 1
  • 7
  • It might be better if you edited the question to show us the failure -- the complete command (without sensitive info) and the full error/exception. – Michael - sqlbot Jan 17 '19 at 14:04
  • 1
    (node:57255) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. Serverless: Excluding development dependencies... Serverless: Recoverable error occurred (self signed certificate in certificate chain), sleeping for 5 seconds. Try 1 of 4 – Priyeshj Mar 20 '19 at 18:00

1 Answers1

4

Run This :

export NODE_TLS_REJECT_UNAUTHORIZED=0

Then do your sls deploy

The other option you can try is :

npm i -g serverless@latest

Then do your sls deploy

Amirhossein Mehrvarzi
  • 18,024
  • 7
  • 45
  • 70