1

On my local machine, in a Docker container based on Ubuntu 16.04, I can see the installed version of awscli:

root@c4383af6f9d5:/# aws --version
aws-cli/1.11.13 Python/3.5.2 Linux/4.8.0-58-generic botocore/1.4.70

In this Docker image, everything works fine and the aws command line tools work as expected.

Separately, on an AWS EC2 instance, also based on Ubuntu 16.04 and with the same provisioning scripts executed as what is used to build the above-mentioned Docker image, I run into a problem.

First, the version of aws-cli

ubuntu@awsIP:~$ aws --version
aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-1020-aws botocore/1.4.70

Second, running an aws s3 ls command to test out connectivity (after running aws configure with appropriate credentials) gives an error:

ubuntu@awsIP:~$ aws s3 ls s3://some-team-folder-name

'AWSHTTPSConnection' object has no attribute 'ssl_context'

I've been trying to understand the error and found some Ubuntu bug reports, but so far nothing that explains how it can be fixed. This error is only happening from the AWS machine. With the same version of awscli on my laptop, I do not see it, and cannot figure out what other package version issue it could be.

Curiously, when I do apt-get update && apt-get install awscli, I see

awscli is already the newest version (1.11.13-1ubuntu1~16.04.0).

but the bug report that I linked above makes it sound like a newer version (1.11.44) should have already been released in the repos (circa Feb 2017).

2 Answers 2

2

This is not a nice workaround, but I found that with sudo pip install --upgrade awscli, I could obtain a newer version than what is available in the OS repos, and upgrading solved the problem.

Would prefer a solution that explains what's going on and how to solve it with a proper system package modification though.

1
  • were you able to get the proper answer?
    – kRazzy R
    Commented Oct 12, 2017 at 21:42
1

I just encountered the same issue. I checked the version of awscli installed by typing aws --version and received this:

aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-98-generic botocore/1.4.70

I went back to the AWS documentation to see if it could clear things up and it mentioned:

The AWS CLI is updated regularly to add support for new services and commands. To update to the latest version of the AWS CLI, run the installation command again.

$ pip install awscli --upgrade --user

I ran that command and then checked the version of the awscli again and it printed out:

aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-98-generic botocore/1.4.70

I didn't think that the upgrade had worked since all the versions were the same but I tried running my script and everything worked now.

So if anyone else runs across this problem just run the upgrade command and that should fix it.

You must log in to answer this question.