Lambda SSL error UNABLE_TO_VERIFY_LEAF_SIGNATURE posted on forums by Shikasta_Kashti

0

Hi,

I'm trying to connect to my mail server from Lambda but when I do I get this error: UNABLE_TO_VERIFY_LEAF_SIGNATURE and it happens intermittently.

I found one post here in the AWS Lambda forums with same error and it indicates it was some DNS error. Here's the link to that post: https://forums.aws.amazon.com/message.jspa?messageID=608080

Any ideas as to what's wrong here? It was week fine until last week. I checked the SSL of the server with ssllabs.com and it doesn't indicate any issue with it.

Original: https://forums.aws.amazon.com/thread.jspa?threadID=235965

Pieter
asked 2 years ago778 views
1 Answer
0

Found an article: https://levelup.gitconnected.com/how-to-resolve-certificate-errors-in-nodejs-app-involving-ssl-calls-781ce48daded

Suggestions are:

  1. Quick fix: Add rejectUnauthorized on request or ENVIRONMENT setting
  2. Add CA certificate to request

Add to request:

https.request({ 
      ....,
      rejectUnauthorized: false,
    },
...)

or environment variable:

NODE_TLS_REJECT_UNAUTHORIZED=0

Alternatively and safer solution is CA certificate:

   ca: [fs.readFileSync([certificate path])],
   rejectUnauthorized: true,
}```
Pieter
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions