Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal error: 'AWSHTTPSConnection' object has no attribute 'server_hostname'

I get this error when running awscli (e.g. I try to run aws s3 sync --delete $BUCKET_URI $PUB_KEYS_DIR I get this).

I have tried reinstalling (apt-get remove awscli && apt-get update && apt-get install awscli), but it doesn't help.

I don't understand where this server_hostname is specified?

Also, this aws s3... command worked before and then just stopped working at some moment.

like image 626
Antonio Jurić Avatar asked Dec 17 '22 18:12

Antonio Jurić


1 Answers

That error is probably related to the fact that you have used apt-get install to install awscli.

Try to remove it

sudo apt-get remove awscli

and reinstall it with pip

sudo python -m pip install --upgrade awscli

If that doesn't work, then you can try to install it using aws bundler installer.

curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"

unzip awscli-bundle.zip

sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
like image 103
Matus Dubrava Avatar answered Jan 21 '23 09:01

Matus Dubrava