• Register
0 votes

Problem :

I have coded one example for how to grant the user access to just one bucket.

After that I tested the config using my W3 Total Cache Wordpress plugin. However my test failed.

I also tried by reproducing the issue using below command :

aws s3 cp --acl=public-read --cache-control='max-age=604800, public' ./test.txt s3://my-bucket/

and that also failed with below error :

upload failed: ./test.txt to s3://my-bucket/test.txt A client error (AccessDenied) occurred when calling the PutObject operation: Access Denied

How can I upload to my bucket?

7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I also had the similar issue while uploading to the S3 bucket protected with the KWS encryption. I have the minimal policy that allows the addition of objects under the specific s3 key.

I needed to add the below listed KMS permissions to my policy to allow the role to put the objects in the bucket.

    "Version": "2012-10-17",
    "Statement": [
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
            "Resource": "*"
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
            "Resource": "arn:aws:kms:<MY-REGION>:<MY-ACCOUNT>:key/<MY-KEY-GUID>"
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": [
            <The S3 actions>
            "Resource": [


38.6k points