Are resized images served with cloudfront and resized with Lambda edge cached?

0

I've just finished reading this AWS tutorial about using cloudfront with Lambda Edge to serve resized versions of an image stored in S3.

Its not entirely clear to me whether these resized images are cached or not. For instance, if person A near edge location X requests resized image https://static.mydomain.com/images/image.jpg?d=100×100 will this resized image then be cached so that it won't have to be resized again when another person requests the same resized image?

質問済み 2年前378ビュー
3回答
1

If you trigger you Lambda@Edge function from an OriginRequest or OriginResponse, the result can be cached, but it will only be cached in the nearest Regional Edge Cache. This means that other locations that connect to the same REC will get the cached values, but location which connect to a different REC, will need to resize the image again.

profile pictureAWS
エキスパート
Uri
回答済み 2年前
0
承認された回答

It depends on what trigger you use - you can choose to execute the Lambda on every request or only on cache misses. e.g. from https://aws.amazon.com/blogs/networking-and-content-delivery/lambdaedge-design-best-practices/ :

From https://aws.amazon.com/blogs/networking-and-content-delivery/lambdaedge-design-best-practices/

エキスパート
回答済み 2年前
0

Please see this AWS solution for Image Optimization: https://github.com/aws-samples/image-optimization

AWS
Piotrek
回答済み 18日前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ