I am trying to list the contents of an Amazon S3 bucket using the following command (documentation):
aws s3 ls s3://mybucket --recursive
However, I get the following error:
Unknown options: --recursive
The following is the version information for my Ubuntu Linux EC2 instance:
$aws s3 ls --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-85-generic
How can I enable the --recursive option on my aws-cli?
'aws s3 ls --recursive' was added in version 1.2.11 - you are using version 1.2.9 - an outdated version. Please upgrade to the latest version.
pip install -U awscli
If you have installed aws-cli using command apt-get install awscli on ubuntu, it installs the older version of aws cli.
You can install the latest aws-cli using pip command, make sure pip is installed on your system. Install aws-cli using this command
pip install -U awscli
To install pip you can use follow commands
sudo apt-get install python-pip
sudo apt-get install python3-pip -> On python3
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