Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Swahjak opened this issue Oct 12, 2023 · 1 comment
Assignees

Comments

@Swahjak
Copy link

Swahjak commented Oct 12, 2023

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

@kamyarz-aws
Copy link
Member

kamyarz-aws commented Oct 12, 2023

Thanks for the suggestion. We've added this to our backlog and will evaluate adding it to a future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants