Disable Cloudfront cache if file is not found
问题 I created a Cloudfront distribution in front of an S3 bucket with a RoutingRule to redirect to a lambda function if the requested file is not found. I´m using this to resize images. Desired flow: Request the file to Cloudfront File not found in Cloudfront check S3 File not found in S3 redirect to the lambda function Lambda will find the original file, resize it and redirect back to the Cloudfront url. Redirect rule set on s3 website: <RoutingRules> <RoutingRule> <Condition> <KeyPrefixEquals/>