Skip to content
Slideshow ontop of a public S3 bucket
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
style.css 2.0

Previous script source was embarrassingly engineered by myself. It was pulling snapshots from the Rpi camera triggered by a URL which presents all sorts of challenges in itself since it's difficult to address the Rpi from the Internet since IPv6 doesn't exist yet.

Now we push camera snapshots to Amazon S3 with a cam.timer which uploads to:$(date +%Y-%m-%d)/$(date +%s).webp

Notice how $(date +%Y-%m-%d) aka YYYY-MM-DD directory becomes the S3 bucket prefix? This makes it possible to easily fetch images by day.

Also for clients that do not support WebP image, a lower resolution JPEG file is uploaded to:

We do not archive the JPEG since it's low resolution and not as space efficient as the WebP format.

Static Web slideshow

After trying & writing, I realised you can make a Web interface to an S3 bucket if you carefully use prefixes.

Backup of old camera snapshots

Singapore region of S3 does not support Glacier. So previous archives have been moved to s3://hsgcamice, where they are stored in Glacier after 2 months.

Note these epoch named files are unprefixed. I should download them and prefix them and upload them to s3:// for a history stretching back years.

You can’t perform that action at this time.