I’m just started getting an “unable to verify the first certificate” error when trying to deploy to aws lambda. It randomly started happening recently. Up until now it was working fine. I’ve seen online of others with similar issues and have tried setting NODE_TLS_REJECT_UNAUTHORIZED=0 with no changes. I also ran the in debug mode and verbose flag on but cant figure out why its still giving the error. Judging by the stack trace, I looks like its giving that error on the S3 upload. Has anyone else encountered this issue?
Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Warning: "rootDir" from local tsconfig.json is overriden
Serverless: Typescript compiled.
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:deploy:deploy
Serverless: Recoverable error occured (unable to verify the first certificate), sleeping 5 seconds. Try 1 of 4
Serverless: Recoverable error occured (unable to verify the first certificate), sleeping 5 seconds. Try 2 of 4
Serverless: Recoverable error occured (unable to verify the first certificate), sleeping 5 seconds. Try 3 of 4
Serverless: Recoverable error occured (unable to verify the first certificate), sleeping 5 seconds. Try 4 of 4
Serverless Error ---------------------------------------
unable to verify the first certificate
Stack Trace --------------------------------------------
ServerlessError: unable to verify the first certificate
at BbPromise.fromCallback.catch.err (/Users/myuser/.nvm/versions/node/v8.10.0/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:272:11)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
at persistentRequest (/Users/myuser/.nvm/versions/node/v8.10.0/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:255:13)
at Timeout.doCall [as _onTimeout] (/Users/myuser/.nvm/versions/node/v8.10.0/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:207:9)
at ontimeout (timers.js:486:15)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)