Cloudfront Origin Group detect failver using Lambda@Edge
问题 My setup: I have a Cloudfront Origin Group where Bucket A is a primary bucket and Bucket B is a secondary bucket. Lambda@Edge is added on origin-request to do a certain process. Whenever a request comes to Cloudfront, my Lambda@Edge modifies it to match the folder structure of my bucket and returns file accordingly. If Bucket A doesn't have a certain file it throws an error and Cloudfront failover requests the file from Bucket B. Bucket B doesn't have the same structure as Bucket it, it