Getting HTTP Client error using the s3 client

2.7k Views Asked by At

Operating system is Ubuntu 16.04

Python version is 3

Installed the AWS CLI using PIP

AWS CLI version is aws-cli/1.16.309 Python/3.6.9 Linux/4.20.17-042017-generic botocore/1.13.45

I set the HMAC creds correctly and type the following in my command line:

ncheaz@thinkburger:~/Projects/drupal-interact$ aws --endpoint-url 'https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints' s3 ls

An HTTP Client raised and unhandled exception: __init__() got an unexpected keyword argument 'ssl_context'

2

There are 2 best solutions below

0
On

You can load the urllib (or urllib3) module by loading it in the Python Interpreter and then checking it's version:

$ python
>>> import urllib
>>> urllib.__version__
'1.17'
0
On

Check your urllib3 version. Upgrading urllib3 to 1.25.11 (latest) solved the problem for me. https://pypi.org/project/urllib3/1.25.11/