• Hi There,

    I have followed every single step to create S3 and Cloudfornt and configuring wp-config file.

    But when I upload images on WordPress it doesn’t show the cloudfront or s3 URL for the images. Then I went to browse buckets from your plugin and it shows following error.

    Error fetching buckets — Error executing “ListBuckets” on “https://s3.amazonaws.com/”; AWS HTTP error: Client error: GET https://s3.amazonaws.com/ resulted in a 403 Forbidden response: AccessDeniedAccess Denied84ASPS (truncated…) AccessDenied (client): Access Denied – AccessDeniedAccess Denied84ASPSPBA2JHE8EX7vVEE3yxjyVMvarxsGUA3qafx2DBp37ZI/WuCx4BBuZ281RU7eTflq6X43NIHUzMoLUodjH1ikM=

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter 1abdullahalasif

    (@1abdullahalasif)

    I have fixed the above issue. So you can ignore that error message.

    I have followed everything you have mentioned in this guide – https://deliciousbrains.com/wp-offload-media/doc/amazon-s3-quick-start-guide/

    and, yet when I upload my images are not going to the s3 bucket. And image URL is showing my domain name.

    I have used AWS terminal to upload images to the bucket and it worked. IAM user permission and everything worked.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    What does your IAM User’s policy look like (JSON format)?

    Does the bucket have a policy, if so, what does that look like?

    -IJ

    Thread Starter 1abdullahalasif

    (@1abdullahalasif)

    I have added the CloudFront but, I haven’t changed the bucket policy from your plugin. It is currently – Block All Public Access Disabled.

    But, If I follow the instruction from your blog and enable this blocking then my images don’t go to the bucket, and Image URLs doesn’t show the CloudFront URL.

    I left it like this. Please let me know if I need to change this bucket policy to Enable.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Please let me know if I need to change this bucket policy to Enable.

    No, keep Block All Public Access turned off until you’ve got things working.

    Please still answer this…

    What does your IAM User’s policy look like (JSON format)?

    Anything in debug.log after adding a new image to the Media Library?

    https://deliciousbrains.com/why-use-wp-debug-log-wordpress-development/

    -IJ

    Thread Starter 1abdullahalasif

    (@1abdullahalasif)

    Hi There,

    It’s interesting that it is working fine. Problem was If I create the bucket from s3 console. If I create the bucket from your plugin that works. S3 technical team also followed the instruction from AWS blog and didn’t work.

    IAM Policy is only AmazonS3FullAccess:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "s3:*",
                    "s3-object-lambda:*"
                ],
                "Resource": "*"
            }
        ]
    }

    Bucket policy is:

    {
        "Version": "2008-10-17",
        "Id": "PolicyForCloudFrontPrivateContent",
        "Statement": [
            {
                "Sid": "1",
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1Y2CVRS4ZUYQG"
                },
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::ba-s3-bucket/*"
            },
            {
                "Sid": "2",
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1Y2CVRS4ZUYQG"
                },
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::ba-s3-bucket/*"
            },
            {
                "Sid": "3",
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1Y2CVRS4ZUYQG"
                },
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::ba-s3-bucket/*"
            }
        ]
    }

    I don’t know why the bucket policy for this website is too long while the bucket policy for other website is only:

    {
        "Version": "2008-10-17",
        "Id": "PolicyForCloudFrontPrivateContent",
        "Statement": [
            {
                "Sid": "1",
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E9OI9SO73FGSX"
                },
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::pixel-photography-bucket/*"
            }
        ]
    }
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Error executing “ListBuckets” on “https://s3.amazonaws.’ is closed to new replies.