How to fix 504 error on AWS CloudFront?

+2 votes

I created a CloudFront distribution, linked it to the load balancer that has my ELB EC2 instance as target. My ELB url is working just fine, and is showing my Angular app.

But I don't know why my Cloudfront URL gets me a 504 error. I would immensely appreciate any help.

Aug 5 in AWS by anonymous
• 150 points
295 views

1 answer to this question.

0 votes
This usually happens if it couldn't either establish a TCP connection or the HTTP first-byte response took more then what was configured in Origin read/response timeout.

To troubleshoot HTTP 504 errors, check the configurations on your firewall, security groups, and origin server to identify the source of the errors.

By default, CloudFront allows you to keep the origin connection open for 30 seconds. If your applications need more than 30 seconds to process and then return a response, then CloudFront returns an HTTP 504 error.

Hope this helps!
answered Aug 5 by Sirajul
• 58,020 points

Related Questions In AWS

+3 votes
4 answers

How to host a website on AWS?

Certainly, it can be used to do ...READ MORE

answered Mar 29, 2018 in AWS by brat_1
• 7,170 points
615 views
0 votes
1 answer

How can i copy tables from one database to other on AWS?

You can use AWS Data pipeline to ...READ MORE

answered Jul 5, 2018 in AWS by Priyaj
• 57,660 points
271 views
+1 vote
1 answer

How to make an application private on AWS Elastic Beanstalk?

Like you said by default, your application ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,600 points
401 views
+6 votes
3 answers
+1 vote
1 answer

Need of CloudFront service in AWS.

Hi@akhtar, We need CloudFront service so that we ...READ MORE

answered Jun 5 in AWS by MD
• 57,680 points
75 views
+1 vote
1 answer

How to restrict Cloudfront service countrywise?

Hi@akhtar, You can restrict your CloudFront according to ...READ MORE

answered Jun 5 in AWS by MD
• 57,680 points
420 views
+2 votes
1 answer

If s3 is global then why we need to select a region while launching it?

This might help you with your query.  Have ...READ MORE

answered Feb 18 in AWS by Sirajul
• 58,020 points
140 views