HTTP 504 status code (Gateway Timeout) | 504 error The request could not be satisfied
AnHTTP504statuscode(GatewayTimeout)indicatesthatwhenCloudFrontforwardedarequesttotheorigin(becausetherequestedobjectwasn’tintheedgecache),oneofthefollowinghappened:CloudFrontwillreturnanHTTP504statuscodeiftrafficisblockedtotheoriginbyafirewallorsecuritygroup,oriftheoriginisn’taccessibleontheinternet.Checkforthoseissuesfirst.Then,ifaccessisn’ttheproblem,exploreapplicationdelaysandservertimeoutstohelpyouidentifyandfixtheissues.ConfigurethefirewallonyouroriginservertoallowCloudFronttrafficIfthe...
An HTTP 504 status code (Gateway Timeout) indicates that when CloudFront forwarded a request to the origin (because the requested object wasn’t in the edge cache), one of the following happened:
CloudFront will return an HTTP 504 status code if traffic is blocked to the origin by a firewall or security group, or if the origin isn’t accessible on the internet. Check for those issues first. Then, if access isn’t the problem, explore application delays and server timeouts to help you identify and fix the issues.
Configure the firewall on your origin server to allow CloudFront trafficIf the firewall on your origin server blocks CloudFront traffic, CloudFront returns an HTTP 504 status code, so its good to make sure that isn’t the issue before checking for other problems.
The method that you use to determine if this is an issue with your firewall depends on what system your origin server uses:
If...