I'm trying to upload a file to Amazon S3 via the command-line, but I keep receiving this error:
A client error (AccessDenied) occurred when calling the CreateMultipartUpload operation: Anonymous users cannot initiate multipart uploads. Please authenticate.
The command I'm running is:
# aws s3 cp --sse pad-20151108-175046.tar.gz s3://mpen-backups
I've configured aws
via aws configure
with what I believe are the correct credentials. aws s3 ls
does list my buckets.
How do I provide a user to AWS CLI? My googlefu isn't turning up anything useful.
I installed aws
via apt-get install awscli
(on Ubuntu).
# aws --version
aws-cli/1.2.9 Python/3.4.0 Linux/3.13.0-24-generic
Solution: take your dog(s) out for a walk.
I just came back after about 30 minutes, pressed up on my terminal and re-ran the exact same command. Uploaded fine this time.
I think either Amazon was having authentication issues when I first ran this, or maybe my S3 bucket hadn't propagated yet, but it runs fine now.
I couldnt upload even when i tried IAM Role, config file and ENV Variables.
In my case it was a Repo installed AWSCLI, specifically on Debian 8.6:
awscli/stable,now 1.4.2-1 all [installed]
Removed it and installed with pip as recommended by AWS Docs
Works now.
In my case this message was displayed because the user trying to copy the file to s3 doesn't have permission to. To fix it was adding user write permission to the s3 bucket.
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