Aws-cli: aws s3 cp error: __init__() got an unexpected keyword argument 'max_bandwidth'

Created on 8 Jan 2018  ·  5Comments  ·  Source: aws/aws-cli

When running ‘aws s3 cp s3_file.txt s3://mybucketname/

I get this error
__init__() got an unexpected keyword argument 'max_bandwidth'

$ aws —version
aws-cli/1.14.18 Python/2.7.14 Darwin/17.3.0 botocore/1.8.23

$ pip install --upgrade s3transfer
Requirement already up-to-date: …..

Still get same error after pip install --upgrade

Any ideas what I am missing?
Thanks

closing-soon

Most helpful comment

pip install awscli --upgrade --user worked for me. Thanks.

All 5 comments

How did you originally install the AWS CLI? Was it using pip? Also could you run which aws to see where it points to? I have a feeling that even though s3transfer is getting upgraded with pip, there is a separate installation of s3transfer that is being used when the CLI is ran, and thus why upgrading is not helping.

which aws shows /Users/userid/anaconda/bin/aws

I am using Python 2.7 as per Anaconda package
awscli was installed with conda install -c conda-forge awscli

I tried un-install and re-install. Uninstalling awscli with conda uninstall awscli
When running aws now I get command not found (as expected)

Then then install awscli again but this time with pip install awscli --upgrade --user

Typing pip show awscli I see:
Name: awscli
Version: 1.14.20
Location: /Users/userid/anaconda/lib/python2.7/site-packages

Look if it should be available but still not working. Get command not found when running aws.

which python shows:
/Users/userid/anaconda/bin/python

Add tried adding any of following to .bash_profile

export PATH="/Users/<userid>/Library/Python/2.7/bin:$PATH"
export PATH =“/Users/<userid>/anaconda/bin:$PATH”
export PATH="~/.local/bin:$PATH"

Get command not found when running aws.

Problem now resolved

Since working in macOS -- I rather used brew install awscli to install AWS cli

which aws now shows: /usr/local/bin/aws
aws --version now shows: aws-cli/1.14.20 Python/3.6.4 Darwin/17.3.0 botocore/1.8.24

pip install awscli --upgrade --user worked for me. Thanks.

pip install 'awscli==1.13.0' --force-reinstall

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ehammond picture ehammond  ·  3Comments

ypant picture ypant  ·  3Comments

vadimkim picture vadimkim  ·  3Comments

pawelkilian picture pawelkilian  ·  3Comments

kangman picture kangman  ·  3Comments