Anonymous user upload objects into S3

0

I have granted full access using bucket policy to Anonymous user. With this setting, can anyone upload the objects? If yes, what is the procedure and commands/options using CLI to upload?

1 Answer
0

Being conscious that opening for such access can represent a risk to your data, let’s answer you questions.

With this setting, can anyone upload the objects?

Yes anyone can upload objects to the bucket, with a policy allowing that.

If yes, what is the procedure and commands/options using CLI to upload?

Refer the guide to use commands such as cp and sync: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/index.html

Thought not applicable in your case, a good practice is to allow upload of objects to s3 via signed urls or cookies: https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html

profile picture
EXPERT
answered a year ago
  • Thanks for your response. I tried to copy the files using CLI and aws s3 cp command. Before using the cp command, I tried to configure the user as none and password as none. But, unable to upload object to S3. set the region as us-east-2, where I created bucket that allows anonymous user to upload. I am getting the following error "upload failed: .\demouser1_credentials.csv to s3://bucket26jan23/demouser1_credentials.csv Unable to locate credentials"

  • You should try the —no-sign-request param, which will not try to load your credentials (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-options.html).

    An example:

    aws s3 cp <file> <s3-bucket> --region <region> --recursive --no-sign-request

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions