I've ran through the entire sequence that I believe I needed to do, but I am still getting an invalid argument type error
while trying to copy my file locally. What am I doing wrong here?
vagrant@dev:~$ aws s3 ls s://bucketname-vagrant
A client error (NoSuchBucket) occurred when calling the ListObjects operation: The specified bucket does not exist
vagrant@dev:~$ aws s3 ls bucketname-vagrant
2015-03-30 14:06:02 285061467 or_vagrant.sql.tar.gz
2015-03-30 13:55:01 102642228 or_vagrant.sql.xz
vagrant@dev:~$ aws s3 ls bucketname-vagrant/or_vagrant.sql.xz
2015-03-30 13:55:01 102642228 or_vagrant.sql.xz
vagrant@dev:~$ aws s3 cp bucketname-vagrant/or_vagrant.sql.xz /tmp/
usage: aws s3 cp <LocalPath> <S3Path> or <S3Path> <LocalPath> or <S3Path> <S3Path>
Error: Invalid argument type
s3
is not deprecated. s3
and s3api
are on different tiers. s3api
is the API-level, while s3
has the high-level commands.
The problem is that you have a typo in s3://
in your first command.
$ aws s3 ls s://bucketname-vagrant
A client error (NoSuchBucket) occurred when calling the ListObjects operation: The specified bucket does not exist
I can replicate that error with my own bucket. This works:
$ aws s3 ls s3://bucketname-vagrant
#cp
$ aws s3 cp bucketname-vagrant/or_vagrant.sql.xz /tmp/
The problem here is that aws-cli doesn't know if you have a local directory named bucketname-vagrant
or not. You can fix that by using the s3://
syntax:
$ aws s3 cp s3://bucketname-vagrant/or_vagrant.sql.xz /tmp/
Again, I replicated that locally.
$ aws s3 cp bucket/test.txt /tmp/
usage: aws s3 cp <LocalPath> <S3Path> or <S3Path> <LocalPath> or <S3Path> <S3Path>
Error: Invalid argument type
$ aws s3 cp s3://bucket/test.txt /tmp/
download: s3://bucket/test.txt to /tmp/keybase.txt
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