AWS S3 CLI: anonymous users cannot initiate multi-page downloads

I'm trying to upload a file to Amazon S3 via the command line, but I keep getting this error:

When calling the CreateMultipartUpload operation, a client error (AccessDenied) occurred: anonymous users cannot initiate multi-page downloads. Please authenticate.

The command that I run:

# aws s3 cp --sse pad-20151108-175046.tar.gz s3://mpen-backups 

I configured aws through aws configure with what I think is the correct credentials. aws s3 ls lists my buckets.

How can I provide an AWS CLI user? My googlefu does not bring 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 
+5
source share
3 answers

Solution: Take the dog out for a walk.

I just returned after about 30 minutes, clicked on my terminal and repeated the same command. This time a penalty has been added.

I think that either Amazon had authentication problems when I first started it, or maybe my S3 bucket has not yet been distributed, but now it works fine.

+19
source

I could not load even when I tried to use the IAM role, configuration file and ENV variables.

In my case, this was the repo installed by AWSCLI, especially on Debian 8.6:

awscli/stable,now 1.4.2-1 all [installed]

Uninstalled and installed using pip as recommended by AWS Docs

It works now.

+2
source

In my case, this message was displayed because the user trying to copy the file to s3 does not have permission. To fix this was adding the user write permission to the s3 bucket.

+1
source

Source: https://habr.com/ru/post/1235494/


All Articles