Porter Photos

I've started a project with my father to make an S3-backed web photo album app. Key requirements:

  • photos stored in a private S3 bucket, organized in some arbitrary manner
  • minimal fixed costs
  • web interface to add/edit/remove albums and photos-in-albums
  • no management of the private S3 bucket
  • albums are abstractions not directly related to how the photos are organized in the S3 bucket
  • albums can be accessed by the public but may be hidden (not listed on an auto-generated list of albums)
  • photos in albums can have titles and/or descriptions (which may be different if placed in a different album)
  • support different view modes (thumbnails, slideshow, etc.)

My first thought was to do it in PHP. And I really wanted to do MVC. So I gave Symfony a shot. It was a struggle. It was easy to get Symfony installed and a basic test page working, but the more I used it, the more I bumped up against the shortcomings of OO PHP.

Next idea: ASP.NET Core. While I've done a fair bit of ASP.NET development at work, I've never created a site from scratch on my own. And I've never run it on Linux. Also, I wanted to use Visual Studio Code, not full Visual Studio, to force myself to learn how it really works.

Here's the plan:

  • ASP.NET Core web app running on Linux EC2 instance
    • Kestrel with Apache reverse proxy
    • album management and viewing
  • .NET Core Lambda function to resize and move images to separate (public) S3 bucket for viewing
  • DynamoDb to track everything

AWS Lambda for the image resizing because in prior projects I found that resizing large images from a tightly-provisioned EC2 instance can be slow and a bit buggy. (Lambda has cold-start slowness. But I'm thinking that I'll pre-generate images anyways.)

DynamoDb because it is serverless, fast, and basically no cost.

Jan 2nd, 2022