Troubleshooting
CloudFront 504 Gateway Timeout
Edge node waited too long for the origin before timing out.
SQL Lens
Run this query locally to surface offenders.
SELECT edge_location, host, time_taken FROM logs WHERE status = 504 ORDER BY time_taken DESCInvestigate in HUDPlaybook
- Measure origin latency and compare with CloudFront origin timeout (30s default).
- Reduce payload size or enable compression to shorten origin time.
- Deploy Origin Shield or regional edge cache near the backend.