Title: Error executing &#8220;ListBuckets&#8221; on &#8220;https://s3.amazonaws.
Last modified: March 4, 2022

---

# Error executing “ListBuckets” on “https://s3.amazonaws.

 *  [1abdullahalasif](https://wordpress.org/support/users/1abdullahalasif/)
 * (@1abdullahalasif)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/)
 * 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/&#8221](https://s3.amazonaws.com/&#8221);;
   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](https://wordpress.org/support/users/1abdullahalasif/)
 * (@1abdullahalasif)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/#post-15428726)
 * 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/](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](https://wordpress.org/support/users/deliciousbrains/)
 * (@deliciousbrains)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/#post-15433577)
 * 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](https://wordpress.org/support/users/1abdullahalasif/)
 * (@1abdullahalasif)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/#post-15433610)
 * 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](https://wordpress.org/support/users/deliciousbrains/)
 * (@deliciousbrains)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/#post-15442094)
 * > 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/](https://deliciousbrains.com/why-use-wp-debug-log-wordpress-development/)
 * -IJ
 *  Thread Starter [1abdullahalasif](https://wordpress.org/support/users/1abdullahalasif/)
 * (@1abdullahalasif)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/#post-15447562)
 * 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.

 * ![](https://ps.w.org/amazon-s3-and-cloudfront/assets/icon-256x256.jpg?rev=1809890)
 * [WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-s3-and-cloudfront/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [1abdullahalasif](https://wordpress.org/support/users/1abdullahalasif/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/error-executing-listbuckets-on-https-s3-amazonaws/#post-15447562)
 * Status: not resolved