Configure error response behavior - Amazon CloudFront (original) (raw)

Configure custom error responses

You have several options to manage how CloudFront responds when there’s an error. To configure custom error responses, you can use the CloudFront console, the CloudFront API, or AWS CloudFormation. Regardless of how you choose to update the configuration, consider the following tips and recommendations:

Configure custom error responses

To configure custom error responses in the CloudFront console, you must have a CloudFront distribution. In the console, the configuration settings for custom error responses are only available for existing distributions. To learn how to create a distribution, see Get started with a basic CloudFront distribution.

Console

To configure custom error responses (console)
  1. Sign in to the AWS Management Console and open the Distributions page in the CloudFront console at https://console.aws.amazon.com/cloudfront/v4/home#distributions.
  2. In the list of distributions, choose the distribution to update.
  3. Choose the Error Pages tab, then chooseCreate Custom Error Response.
  4. Enter the applicable values. For more information, see Custom error pages and error caching.
  5. After entering the desired values, chooseCreate.

CloudFront API or AWS CloudFormation

To configure custom error responses with the CloudFront API or AWS CloudFormation, use theCustomErrorResponse type in a distribution. For more information, see the following:

Generate custom error responses

Create a custom error page for specific HTTP status codes

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.