garbage.today — an almost non-trivial AWS Lambda image search/host
- It’s curated by me and thus it is better than other existing ones
- It only runs sometimes (it is ~serverless~)
And that’s pretty neat right? It took me about an afternoon, costs about the same as competing services in money and/or my soul (privacy), and I control entirely how it indexes/searches for things.
Things I didn’t have to do
These are things you personally might not have had to do, but if I was to reproduce this with familiar services and frameworks it would include:
- Fire up a familiar framework like Django
- Some basic auth maybe, since not everyone should get to upload
- Hook up some storage backend so images go in the right place, can be retrieved
- Include something (
celery) to do async indexing
- Host this backend somewhere with all the things (Elasticsearch, Redis/RabbitMQ, Django/WSGI, Postgresql)
- Pay money 24/7 for a server that is barely in use
Things I had to do that almost didn’t make it worth it
I made a cool chart about how my time was allocated over the course of this project
A big serverless selling point for developers is that you can just write application code and this appears to be a house of lies.
At least with Lambda, I spend a sizable amount of time just fiddling with access controls and very little time writing application code.
Here are a few of the places and ways you can modify access controls in AWS.
It’s worth noting that some things in AWS seem like they might be the place to modify access right for an app like this but are wholly irrelevant.
Also they just changed everything kinda I guess?