502 ERROR DNS of CloudFront and Route 53

0

I am currently facing an issue with my AWS setup involving Elastic Beanstalk, ELB, CloudFront, and Route 53. I would appreciate your assistance in resolving this matter.

When attempting to access my application through the server DNS in the HTTPS format (Elastic Beanstalk > ELB > CloudFront > Route 53), I can successfully see the output of the Elastic Beanstalk at the Load Balancer using its DNS. However, when trying to access it through CloudFront and Route 53 using their respective DNS, I encounter the following error:

502 ERROR The request could not be satisfied. 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.

The error seems to be originating from CloudFront, and I would like to understand the possible causes and steps to troubleshoot this issue. I have reviewed the CloudFront documentation, but the error persists.

Could you please guide me on how to troubleshoot and address this connection issue?

asked 4 months ago252 views
1 Answer
0

Initally it sounds like your Cloudfront is pointing to an origin DNS that doesnt match the SSL Cert on the ALB. Please ensure the SSL Cert name matches what cloudfront is configured to point too.. otherwise more info is needed

  1. Is it Public or Private?
  2. Do you have any rules? If so please advise
  3. Does your cloudfront point to ALB as an origin? If so please advise
  4. Hows your cloudfront configured regarding HTTP and HTTPS
  5. Target Group configuration.
  6. Does your ALB have ssl?
profile picture
EXPERT
answered 4 months ago
  • Is it Public or Private?

    The Elastic Beanstalk (EB) and Elastic Load Balancer (ELB) are public. The CloudFront distribution points to the Load Balancer (LB). However, when using CloudFront and Route 53, the setup is private. Do you have any rules? If so, please advise.

    No specific rules have been mentioned. The connection is established using security groups. Does your CloudFront point to ALB as an origin? If so, please advise.

    Yes, CloudFront is configured to point to the Application Load Balancer (ALB) as its origin. How is your CloudFront configured regarding HTTP and HTTPS?

    CloudFront can support both HTTP and HTTPS. It's crucial to check the CloudFront distribution settings to confirm the desired protocols and ensure correct SSL/TLS configuration. Target Group configuration.

    The Target Group is confirmed to be in good condition. Does your ALB have SSL?

    No, the ALB does not have an SSL certificate.

  • Can I clarify your question more. application through the server DNS in the HTTPS format (Elastic Beanstalk > ELB > CloudFront > Route 53), I can successfully see the output of the Elastic Beanstalk at the Load Balancer using its DNS

    Little confused you say you use https to bean stalk and then to the alb. Where is https and is the alb in front of beanstalk? Where is the ssl cert?

    Cloud front would be infront of the alb and then beanstalk.

  • In the elastic beanstalk and application load balancer, confusion will be explained. I can see what I want in elastic beanstalk DNS in http format. In the application load balancer, the target group is pointed to the elastic beanstalk EC2 private IP. I can see the output of elastic beanstalk in the application load balancer in http format. I got an AWS CA certificate for only the Route 53 subdomain and gave it to CloudFront. That is what I did.

  • Bro,  it. Can you tell me where I made a mistake and how to fix it? It helps everyone; am I doing it the wrong way?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions