S3 Bucket action doesn't apply to any resources

前端 未结 11 784
无人及你
无人及你 2021-01-30 09:55

I\'m following the instructions from this answer to generate the follow S3 bucket policy:

{
  \"Id\": \"Policy1495981680273\",
  \"Version\": \"2012-10-17\",
  \         


        
11条回答
  •  耶瑟儿~
    2021-01-30 10:26

    I have also faced the similar issue while creating the bucket

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "AddPerm",
                "Effect": "Allow",
                "Principal": "*",
                "Action": [
                    "s3:GetObject"
                ],
                "Resource": [
                    "arn:aws:s3:::mrt9949"
                ]
            }
        ]
    }
    

    I have changed the above code to

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "AddPerm",
                "Effect": "Allow",
                "Principal": "*",
                "Action": [
                    "s3:GetObject"
                ],
                "Resource": [
                    "arn:aws:s3:::mrt9949/*"
                ]
            }
        ]
    }
    

    add /* to your bucket name it will solve the issue

    Here my bucket name is mrt9949

提交回复
热议问题