Meta
Python: 2.7.5
Pip : pip 18.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
AWS CLI : aws-cli/1.16.104 Python/2.7.5 Linux/3.10.0-862.3.3.el7.x86_64 botocore/1.12.94
Boto3 : 1.9.94
Centos : CentOS Linux release 7.5.1804 (Core)
My script
import boto3
from botocore.exceptions import ClientError
ec2 = boto3.client('ec2')
try:
response = ec2.describe_instances()
print(response)
except ClientError as e:
print(e)
When I run my script, I get this exception :
- botocore.exceptions.SSLError: SSL validation failed for https://ec2.region.amazonaws.com/ hostname 'ec2.region.amazonaws.com' doesn't match either of '*.com.com', 'com.com'
Please any help would be appreciated! Thanks!