• Resolved totojack

    (@totojack)


    Hi.

    We configured a bucket on S3, but it seems that there are problems with IAM policy. During file upload we got a 403 Forbidden error:

    [Thu Jan 31 14:52:34.907763 2019] [php7:notice] [pid 25470] [client 172.31.10.217:46672] AS3CF: Error offloading /data/www/wp-content/uploads/2019/01/Network-Automation.pdf to provider: Error executing “PutObject” on “https://tobedeleted-test.s3.eu-west-1.amazonaws.com/wp-content/uploads/2019/01/31145234/Network-Automation.pdf&#8221;; AWS HTTP error: Client error: PUT https://tobedeleted-test.s3.eu-west-1.amazonaws.com/wp-content/uploads/2019/01/31145234/Network-Automation.pdf resulted in a 403 Forbidden response:\n<?xml version=”1.0″ encoding=”UTF-8″?>\n<Error>AccessDenied<Message>Access Denied</Message><RequestId>671DE7 (truncated…)\n AccessDenied (client): Access Denied – <?xml version=”1.0″ encoding=”UTF-8″?>\n<Error>AccessDenied<Message>Access Denied</Message><RequestId>671DE7A2CB1F6C19</RequestId><HostId>H8blhGvGKTJQ5AxCfWQBaAvitxhyiaqFmh4YA7CPEO1s1vyWBFw7XWUH1xBmddrbbs+rEOnV5Es=</HostId></Error>

    These are the policy assigned to the bucket:

    {
    “Version”: “2012-10-17”,
    “Statement”: [
    {
    “Action”: [
    “s3:GetBucketLocation”,
    “s3:ListAllMyBuckets”
    ],
    “Resource”: “arn:aws:s3:::*”,
    “Effect”: “Allow”
    },
    {
    “Action”: [
    “s3:ListBucket”
    ],
    “Resource”: [
    “arn:aws:s3:::tobedeleted-test”
    ],
    “Effect”: “Allow”
    },
    {
    “Action”: [
    “s3:List*”,
    “s3:Put*”,
    “s3:Get*”,
    “s3:AbortMultipartUpload”,
    “s3:DeleteObject*”
    ],
    “Resource”: [
    “arn:aws:s3:::tobedeleted-test”,
    “arn:aws:s3:::tobedeleted-test/*”
    ],
    “Effect”: “Allow”
    }
    ]
    }

    I tried using the AWS cli with the same IAM user credentials, and I was able to upload files. After configuring the bucket on backend, I see an error message on top of configurations page:

    “Access Denied to Bucket — Looks like we don’t have write access to this bucket. It’s likely that the user you’ve provided access keys for hasn’t been granted the correct permissions. Please see our Quick Start Guide for instructions on setting up permissions correctly.”

    Is there something wrong with the policy? Should I enable other actions?

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter totojack

    (@totojack)

    Hi.

    It seems that the problem was the bucket access status. It must be “Objects can be public”.

Viewing 1 replies (of 1 total)

The topic ‘Error executing “PutObject”’ is closed to new replies.