Discussion:
[S3tools-general] Upload a local file to s3, without ListBuckets permission?
Dan Stromberg
2017-03-22 21:19:34 UTC
Permalink
Can s3cmd or any similar tool upload a local file to s3, without first
trying to list all of the keys in the target bucket?

I tried:
1) s3cmd
2) aws cli
3) s4cmd
4) s3curl

...but none of them worked. They all gave a permission denied of one form
or another (cut and paste available on request).

More specifically, s3cmd gave:
# INFO: Compiling list of local files...
# INFO: Running stat() and reading/calculating MD5 values on 1
files, this may take some time...
# INFO: Summary: 1 local files to upload
# upload: '<filename>' -> 's3://<bucket>/<hash>' [1 of 1]
# 329216 of 329216 100% in 1s 305.69 kB/s done
# INFO: Forwarding request to us-east-1
# upload: '<filename>' -> 's3://<bucket>/<hash>' [1 of 1]
# 329216 of 329216 100% in 0s 347.07 kB/s done
# ERROR: S3 error: 403 (AccessDenied): Access Denied

# It's as though it's being redirected and then finds it can't do
the copy.
s3cmd put -v --progress "$filename"
"s3://cylancefilestorestaging/$sha256hash"


Any suggestions?

Thanks!

Loading...