Tuesday 2 January 2018

Amazon Lambda@Edge now enables you to customize the error responses from the origin



Amazon Lambda@Edge now allows you to alter error responses from the origin by enabling you to launch Lambda function in response to the HTTP errors that the Amazon CloudFront gains from the origin. So when the Lambda@edge functions are associated with the Amazon CloudFront origin response event will be now be compelled for 4XX and 5XX error status codes which will be supported by the 2XX and 3XX status codes. With this new feature, you can now utilize Lambda@Edge to override and access the error responses or notification that Amazon CloudFront receives from the origin. 

The users can add issue redirects, add headers or can also robustly create a response for the viewers which are based on the request characteristic. If the origin is down or the connection is poor within the configured timeout value then the viewers are presently served an HTTP 5XX error or the static custom error page configured in the Amazon CloudFront. You can also instead of redirecting viewers to the fail-over location or create a customized response with the Lambda function and return a 200 Status code. You can utilize this feature to add the HSTS security headers on error responses to enhance the overall website security. 

No comments:

Post a Comment

Maximizing Content Delivery Efficiency: Optimizing Performance in AWS CloudFront

  Unleash Blazing-Fast Content Delivery: Your Guide to CloudFront Optimization Introduction: AWS CloudFront stands as a cornerstone of moder...