Permissions bug for AWS S3 CLI

Source: Internet
Author: User

A bucket was created on S3 using the AWS CLI, and the following error was reported when uploading a file:

A Client Error (AccessDenied) occurred when calling the Createmultipartupload operation:anonymous users cannot initiate m Ultipart uploads. Please authenticate.

Execute command: AWS S3 LS S3://mybucket-1 also prompts for permission errors.

Before using the AWS CLI Operation S3 is normal, the only difference is: this time I am using an IAM user, not the root user. However, the IAM user I am using has granted the "amazons3fullaccess" permission, which in theory can be accessed normally by S3.

Try to set policy for buckets:

{    "Version":"2012-10-17",    "Statement": [        {            "Sid":"",            "Effect":" Allow",            "Principal":"*",            "Action":"S3:listbucket",            "Resource":"arn:aws:s3:::mybucket-1"        },        {            "Sid":"",            "Effect":" Allow",            "Principal":"*",            "Action": [                "S3:deleteobject",                "S3:getobject",                "S3:putobject"            ],            "Resource":"arn:aws:s3:::mybucket-1/*"        }    ]}

Then use the AWS CLI to operate S3, everything works. At this point, the problem is solved.

The next day, accidentally using the AWS CLI to operate another bucket with no policy set, everything works! Then delete the policy on "mybucket-1" and try using the AWS CLI again to operate "mybucket-1", the result is still normal!

After the google,stack overflow a great God gave the answer: when encountering this problem, go out and walk the dog a lap back and then continue to operate it is OK!

Http://stackoverflow.com/questions/33600192/aws-s3-cli-anonymous-users-cannot-initiate-multipart-uploads

Permissions bug for AWS S3 CLI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.