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?

feita há 2 anos379 visualizações
3 Respostas
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
ESPECIALISTA
Uri
respondido há 2 anos
0
Resposta aceita

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/

ESPECIALISTA
respondido há 2 anos
0

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

AWS
Piotrek
respondido há 18 dias

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas