How do I resolve "403 ERROR - The request could not be satisfied. Bad Request" in Amazon CloudFront?

Last updated: 2022-05-31

Amazon CloudFront is returning the error message "403 ERROR - The request could not be satisfied. Bad Request." How can I resolve this error?

Short description

The error message "403 ERROR - The request could not be satisfied. Bad Request." is from the client. This error can occur due to one of the following reasons:

  • The request is initiated over HTTP, but the CloudFront distribution is configured to allow only HTTPS requests. To resolve this, follow the steps in the Allow HTTP requests Resolution section.
  • The requested alternate domain name (CNAME) isn't associated with the CloudFront distribution. To resolve this, follow the steps in the Associate a CNAME with a distribution Resolution section.

Note: This resolution is for troubleshooting the error when you own the application or website that uses CloudFront to serve content to end users. If you receive this error while trying to view an application or access a website, contact the provider or website owner for assistance.

Resolution

Allow HTTP requests

Follow these steps:

  1. Open the Amazon CloudFront console.
  2. Choose the distribution that's returning the Bad Request error.
  3. Choose the Behaviors tab.
  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.
    Note: HTTP and HTTPS allow connections on both HTTP and HTTPS. Redirect HTTP to HTTPS automatically redirects HTTP requests to HTTPS.
  6. Choose Save Changes.

Associate a CNAME with a distribution

Follow these steps:

  1. Open the Amazon CloudFront console.
  2. Choose the distribution that's returning the Bad Request error.
  3. Choose the General tab.
  4. Under Settings, choose Edit.
  5. For Alternate Domain Names (CNAMEs), select Add Item.
  6. Enter the CNAME that you want to associate with the CloudFront distribution.
  7. Under Custom SSL certificate, choose the certificate that covers the domain. For more information, see How do I configure my CloudFront distribution to use an SSL/TLS certificate?
    Note: An SSL certificate is required to associate a CNAME with a distribution. For more information see, Requirements for using alternate domain names.
  8. Choose Save changes.