Fix: SSL validation failed for

This usually pops up on older AWS CLI clients, like the one in FreeBSD for example.

When you get this error using AWS CLI

# aws ec2 describe-instances

SSL validation failed for [X509] PEM lib (_ssl.c:4298)

Quickly fix it with:

The below assumes you have 'curl' installed

curl{SFSRootCAG2,AmazonRootCA4,AmazonRootCA3,AmazonRootCA2,AmazonRootCA1}.pem >> ~/.aws/ca_bundle.pem
aws configure set ca_bundle '~/.aws/ca_bundle.pem'

This is due to a missing CA. You could pass the "--no-verify-ssl" flag, but people on the Internet frown upon it. However, you are an adult, make your own choice. Use that or add the missing CA to your local machine.