SSL Validation error

0

I am trying to run a CloudFormation template through CLI and I am getting SSL validation error, I am also getting same error for the command aws s3 ls SSL validation failed for https://s3.us-east-1.amazonaws.com/ [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002). I would like to know solution for this

Tej
asked 8 months ago2047 views
1 Answer
0

Hello.

This may occur when special CAs or other special CAs are used in the environment where the AWS CLI is running.
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-troubleshooting.html#tshoot-certificate-verify-failed

When you use a AWS CLI command, you receive an [SSL: CERTIFICATE_ VERIFY_FAILED] certificate verify failed error message. This is caused by the AWS CLI not trusting your proxy's certificate due to factors such as your proxy's certificate being self-signed, with your company set as the Certification Authority (CA). This prevents the AWS CLI from finding your companies CA root certificate in the local CA registry.

If you just want to run the command for now, you can add "--no-verify-ssl" as an option.

aws s3 ls --no-verify-ssl

However, "--no-verify-ssl" is not recommended for security reasons and should be used as a temporary measure.
Basically, it is best to specify the CA certificate with the "--ca-bundle" option.
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-options.html

This option is not best practice. If you use --no-verify-ssl, your traffic between your client and AWS services is no longer secured. This means your traffic is a security risk and vulnerable to man-in-the-middle exploits. If you're having issues with certificates, it's best to resolve those issues instead. For certificate troubleshooting steps, see SSL certificate errors.

profile picture
EXPERT
answered 8 months ago
profile pictureAWS
EXPERT
reviewed 8 months 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