I dont think its cloudfront. CF is way too big with millions of websites using it. The only problematic site I've experienced in last few weeks is AT. I think its more likely to do with ATs server configuration or some glitch from its end.
504 -- CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.