SSL validation failed for [SSL: CERTIFICATE_ VERIFY_FAILED] certificate verify failed (_ssl.c:749)


When I run the command aws s3 ls I’m getting this error:

It work’s fine with --no-verify-ssl

How can I make it work with ssl verficication?

log below:


The issue here is not using proxy per se (AWS CLI allows this by setting e.g. HTTPS_PROXY environment variable) but the AWS CLI client not trusting proxy’s certificate. Proxy’s certificate might be self-signed, with your company set as CA (Certification Authority). AWS CLI client cannot find your company’s CA root certificate in the local system’s CA registry so it can’t verify proxy’s certificate and issues the CERTIFICATE_VERIFY_FAILED error.

To fix this we can pass company’s root certificate (e.g. company-root-ca.pem) to AWS CLI client via –ca-bundle command parameter (or via AWS_CA_BUNDLE environment variable or config file):

Leave a Reply