// troubleshooting guide · aws cloudfront

CloudFront 504 Gateway Timeout Error

Status
Workaround available
platforms:
AWS Console, EC2, ALB, API origins
updated:
November 17, 2026
reports:
5
Method
how we research
Share

RUNBOOK · aws-cloudfront/504-gateway-timeout4 FIXES

// quick answer

A 504 means the origin didn't connect or respond in time: by default CloudFront tries 3 connections of 10 seconds each and waits 30 seconds for a response. Open the origin firewall to CloudFront, speed up the endpoint, then raise the origin response timeout if needed.

Most likely fix: Allow CloudFront to reach the origin

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Allow CloudFront to reach the origin

    1. 01Add the AWS managed prefix list com.amazonaws.global.cloudfront.origin-facing to the origin security group on ports 80/443
    2. 02Check NACLs and on-host firewalls
    3. 03Test from outside with curl -v https://origin.example.com
    Did this fix it?
  2. FIX 2Raise the origin response timeout

    1. 01Open the distribution > Origins > select origin > Edit
    2. 02Under Additional settings increase Response timeout (default 30 seconds)
    3. 03Request a quota increase in Service Quotas if you need more than the console allows
    4. 04Save and wait for deployment
    Did this fix it?
  3. FIX 3Make the slow endpoint asynchronous

    1. 01Return 202 Accepted immediately and process the job in the background
    2. 02Let the client poll a status endpoint or receive a webhook
    3. 03Keep CloudFront timeouts short so failures surface fast
    Did this fix it?
  4. FIX 4Check AWS Health for incidents

    1. 01Open health.aws.amazon.com or the AWS Health Dashboard in the console
    2. 02Look for CloudFront or regional events before changing configuration
    Did this fix it?

Symptoms

504 ERROR 'The request could not be satisfied' after roughly 30 seconds, typically on slow API calls, uploads or report generation.

Why it happens

  • C-01Origin security group or firewall blocks CloudFront IP ranges
  • C-02Endpoint takes longer than the 30-second default response timeout
  • C-03Origin overloaded or keep-alive settings shorter than CloudFront's
  • C-04VPC origin connectivity problems (as in the July 2026 incident)

// this guide also covers

  • cloudfront 504 gateway timeout
  • cloudfront timeout 30 seconds
  • increase cloudfront origin response timeout
  • cloudfront 504 error

Still not working?

If AWS CloudFront keeps failing, you're not alone. See every AWS CloudFront problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch AWS CloudFront Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other AWS CloudFront errors

All 12 AWS CloudFront errors and fixes →