jpsim / jpsim/AWSPics

Debounce site builder lambda

Open
#1 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
224
Forks
60
PR merge metrics
No merged PRs in 30d

Description

From jpsim.com/awspics:

Another related problem is that for every new image in the source bucket, two are created in the resized bucket, each one invoking the site builder function. Not only that, but if I upload an album with lots of pictures all in one shot, the site will be rebuilt twice for each picture! 🙀

Unfortunately, S3 buckets can only have a single notification per event type, so we can't trigger both the resize and site builder functions when new objects are created on the source bucket.

I think the solution here would involve publishing S3 events to SNS or SQS and "debouncing" the site builder lambda, but again... #complexity.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the S3 notifications that invoke the resize and site builder Lambdas. Read the linked AWS S3 notification documentation and compare SNS or SQS as the event path. Done means an album upload does not rebuild the site once per resized image while all new images are still reflected.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.