1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
CloudFront doesn't invoke edge functions for viewer response events when the origin returns HTTP status code 400 or higher [1].
Lambda@Edge functions for origin response events are invoked for all origin responses, including when the origin returns HTTP status code 400 or higher. Hence, you can use Lambda@Edge function at the origin response for your requirement [2].
References :
answered 7 days ago
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 9 months ago
With test event, the code is behaving as expected.