How do I fix CloudFront error?

How do I fix CloudFront error?

Resolution

  1. Open the Amazon CloudFront console.
  2. Choose the distribution that is returning the Bad Request error.
  3. Choose the Behaviors view.
  4. Choose the behavior that matches the request. Then, choose Edit.
  5. For Viewer Protocol Policy, choose either HTTP and HTTPS or Redirect HTTP to HTTPS.
  6. Choose Yes, Edit.

What is CloudFront error?

HTTP 502 errors from CloudFront can occur because of the following reasons: There’s an SSL negotiation failure because the origin is using SSL/TLS protocols and ciphers that aren’t supported by CloudFront. The custom origin isn’t responding on the ports specified in the origin settings of the CloudFront distribution.

How do I enable CloudFront logging?

Click the “Distribution Settings” button from menu to get into the “CloudFront Distribution” configuration page. Click the “Edit” button from the “General” tab on the top menu. In the “Distribution Settings” tab scroll down and verify the “Logging” feature configuration status.

What are the security requirements for a CloudFront distribution?

Be sure that your distribution and load balancer meet the following security requirements: You must have a valid SSL certificate installed on the load balancer. If you’re still getting HTTPS errors after installing an SSL certificate, troubleshoot the SSL connection between CloudFront and the custom origin server.

How long does CloudFront fail over to secondary origin?

By default, CloudFront tries to connect to the primary origin in an origin group for as long as 30 seconds (3 connection attempts of 10 seconds each) before failing over to the secondary origin. For some use cases, like streaming video content, you might want CloudFront to fail over to the secondary origin more quickly.

Are there any HTTPS issues with Amazon CloudFront?

I’m using a Classic Load Balancer or Application Load Balancer as the origin for my Amazon CloudFront distribution. I have HTTPS and HTTP listeners configured on my load balancer, but the HTTPS communication between CloudFront and my load balancer fails.

How does the failover function work in CloudFront?

The primary origin responds with an HTTP status code that’s configured for failover. The Lambda function is triggered again when CloudFront sends the same request to the secondary origin. The following diagram illustrates how origin failover works when you include a Lambda@Edge function in an origin request or response trigger.