Skip to content

Use Origin Shield Failover to improve cost efficiency and allow bigger images to be processed #510

@Swahjak

Description

@Swahjak

Is your feature request related to a problem? Please describe.

  1. If there is a miss on Cloudfront, Lambda will always be called to generate an image.
  2. Lambda limits the size of images that can be processed (returned to the client)

Describe the feature you'd like

There is another 'image optimization' project from AWS which describes a way to use Sharp to resize images. It's a lot less sophisticated on the transformations, but it does use a failover mechanism provided by Origin Shield which allows the 'transformed' image to be persisted to another S3 bucket (which solves 1).

It would also provide a mechanism for supporting larger images by persisting the image and returning a status code that tells te client to restart the request. At the time the client restarts the request the image will be available in S3 and can be served.

https://github.com/aws-samples/image-optimization.

From my perspective it would also make sense to combine these two repositories / solutions because of their similarities.

Additional context

aws-samples/image-optimization@main...graceful-failover

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions