0

I'm building a fairly simple WordPress website where I have installed the plugin S3 Offload (to automatically push all the images to my S3 server).

While using S3 on its own, everything sort of worked (very slow loading), however, after I have enabled also CloudFront and waited for 24h for the distribution to be fully deployed, I started receiving 503 errors when requesting the images.

I was going through some CloudFront articles about the matter and I made sure to follow the guidelines (link the S3 bucket in the distribution, set the objects in the S3 bucket to be public, etc.), however, I'm still getting the same error.

Any idea?

Cheers!

ilrock
  • 573
  • 8
  • 24
  • Out of my curiosity. How many gets request does your s3 bucket is consuming? – Naveen Kerati Jul 12 '17 at 04:05
  • Once a CloudFront distribution shows `Deployed`, usually in under 30 minutes, there should be no need to wait any longer. Now, the following is not your solution, but it will help simplify troubleshooting: [read this answer](https://stackoverflow.com/a/35541525/1695906) and set your Error Caching Minimum TTL for 503 errors to 0 seconds. The default is 300 which means *if* an error occurs for a given object, CloudFront will not try to fetch it again for 5 minutes, returning the prior error. Do the same for 403, 404, 502, and 504. – Michael - sqlbot Jul 12 '17 at 12:07
  • If you are familiar with curl, please capture a response from fetching an object using `curl -v 'some-cloudfront-url'` and edit it into the question; otherwise, screen shots from the browser, including request and response headers and the response body would be helpful. Or just provide us with an example CloudFront URL of a valid image. Also, the Origin Domain Name from your distribution would be helpful, if you are at liberty to show this. – Michael - sqlbot Jul 12 '17 at 12:12

1 Answers1

-1

Thanks for your comments guys!

At the end it turned out to be due to a conflict between the configuration of the wordpress plugin and the configuration of the distribution itself.

Everything is working smoothly now :)

ilrock
  • 573
  • 8
  • 24