serverless-sharp
serverless-sharp copied to clipboard
Cloudfront invalidation when source asset it updated
Currently if an s3 asset is updated/replaced (i.e. "Replace File" in your CMS), the resized versions will be cached in Cloudfront and therefore stale.
Could we trigger a CF invalidation when an s3 object is updated?
This seems like it should be pretty-doable; however, I'd like to make it optional since CDN invalidations can add quite a bit of cost if not used efficiently.
An additional option is to support an additional parameter for version
or something to that affect.
I'd like to make it optional since CDN invalidations can add quite a bit of cost if not used efficiently
Yep.
Seems to be a bit of a tossup if this should be handled from your app or be integrated as part of the lambda.
An additional option is to support an additional parameter for version or something to that affect.
sounds a good option