Home

More Bucket Ponderings

09/01/2023

It's Monday 9th January, so I'm back to work on the day job. This will significantly impact my progress with the Cantilever project.

I'm still thinking about my issues with S3 buckets and where to store the temporary files. If I store the temporary files in the source bucket, then the FileUploadHandler will be fired every time I create a file there. If I store the files in the destination bucket, then they will be available to anyone who knows or can work out the URL. And if I create a third, working folder bucket... that seems a little wasteful.

The only way I can think of doing it with just two buckets is to turn off website hosting for the destination bucket, then set up a Cloudfront distribution as my public route into the content. But I'd probably need to add Lambda@Edge functions to convert URLs like http://www.website.com/folder/ into http://www.website.com/folder/index.html - and I don't really like that idea. But it would allow me finer control of permissions in the destination bucket.

In the end, it seems a temporary working bucket is the most straightforward approach.

Prev: Building Navigation, part 1 Next: A File Upload Locking Issue