So I was reading through the responses through this question (https://news.ycombinator.com/item?id=26912321) and along the way I circled back to an old pet peeve, which is that it seems like maintaining a simple text file log of anything serverless on AWS is apparently impossible.
Situation: I am running a drawing app over Lambda websockets. I want to have "channels" where a client can post draw commands and everyone sitting in that channel will receive them. Newcomers can request a chat log. Messages will probably come in every few seconds and will be short. Channels are ephemeral so it's unlikely a chat log will ever exceed 1MB.
With EC2, it's just an operating system so you append files locally. However, I don't want to pay for an EC2 instance just to maintain a text file. One option I considered was just hosting an actual IRC server on an EC2 instance, but then I have to figure out how to maintain an IRC network once it grows past one server, which I have no experience in doing.
I thought for sure S3 would have an append function, but it doesn't. The "proper" way to do it is to read the entire file, append the string locally, and then write the result back. This is annoying because it means that every call to log something will exponentially increase the amount of bandwidth required to perform the call. As AWS charges for bandwidth, this is a non-starter.
So the last remaining plan is to use a serverless database like DynamoDB or AWS Aurora. Unfortunately, I'm a college student so a $60/mo price tag for Aurora is actually hefty for me. So DynamoDB it is.
But does it really have to be? Do I really need to spin up an entire database just to store lines of text in the cloud? Don't get me wrong, I know I have to use a database anyways, I just figured there would be something that would already exist that would be easy for this.
Maybe a PubSub startup exists for this type of job? Any recommendations?