Not working
root@49161b16e779:/# aws --version
aws-cli/1.11.121 Python/3.5.2 Linux/4.10.0-32-generic botocore/1.5.84
root@49161b16e779:/# aws s3 ls s3://my.bucket.path
'AWSHTTPSConnection' object has no attribute 'ssl_context'
Working fine
tada@tada-VirtualBox:~$ aws --version
aws-cli/1.11.13 Python/3.5.2 Linux/4.10.0-32-generic botocore/1.4.70
The above is a problem I'm getting lately, since somewhere between July 25 and Aug 3, 2017.
Docker is node:6.9.2. Also tried the 'ubuntu' image, same error.
I can't seem to find the error source. Anyone know how to solve it? Thanks.
This is caused by a bug in AWS CLI, noted at https://github.com/boto/botocore/issues/1258#issuecomment-321787841, that mades it incompatible with newer versions of Requests. If you install awscli
with Pip, you won't see the bug, because the version that you get from Pip has an old, compatible version of Requests baked into it. But if you've installed AWS CLI with Apt (or perhaps some other package managers), you'll have got a version of AWS CLI that uses the system's Requests module, exposing you to this bug.
To fix, either:
apt remove awscli && pip install awscli
.... OR, if you can't do that for some reason:
pip uninstall requests && pip install requests==2.12
or pip3 uninstall requests && pip3 install requests==2.12
.I believe this issue is fixed as of botocore v1.11.0, so eventually, once the version of awscli in Apt's repositories uses a botocore version >= v1.11.0, this bug should go away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With