global name 'ssl' is not defined error while executing aws s3 cp command
11:01 30 Mar 2017

Am trying to upload a file to the AWS S3 using the AWS CLI command. I am using a system with RedHat 4 operating system. Python version is 2.7.9 OpenSSL version is 0.9.8v 19 Apr 2012.

I have installed the AWS CLI and when I executed the below command I got an error regarding the ssl

[test-user@redhat4 ~]$ aws s3 cp /export/home/test_dir/test_file.txt s3://test-bucket/ --region us-west-2

upload failed: test_file.txt to s3://test-bucket/test_file.txt global name 'ssl' is not defined

Does I have to configure anything regarding the Openssl. Could anyone please help me to resolve this issue as am blocked with this issue for the last few days.

python-2.7 amazon-web-services openssl aws-cli