Back to Posts

When you probably don't need DynamoDB

March 19th, 2020 - 2 minute read


I mean maybe you personally do, but for me and my use case? Nuh-ah.

When I started TakeThePowerBack, I'd built it with Node and a little relational database in MySQL. It was easy to reason with, used TypeORM to further simplify access logic and was all sunshine and roses.

At some point, I found out about DynamoDB and thought that the trade-offs for cheapness, speed and scale couldn't be ignored.

Before even diving into reading about the limitations, I started doing instead (classic).

Things you should know if you are thinking of switching between the two:

  • You need to find an easy way of accessing DynamoDB from Node. Writing it yourself is not worth the hassle.
  • The errors from DynamoDB queries (and a lot of other AWS infrastructure) are terrible, obtuse and not helpful. You will get used to them and know common pitfalls, but it's not as easy as a classic SQL error.
  • You can link DynamoDB records together (this is more a pitfall when switching from Relational to NoSQL) with keys, but this gets a hellofalot more complex than just you're classical FKs.

My main problem was that I jumped on it for scaling's sake. I learnt a great deal, which is super helpful for future work and understanding its actual applications.

The thing is, my relational database was fine as it was for an MVP.

I guess the moral of the story is, do your research, use what you're comfortable with (unless it makes what you are building super terrible) and do the simple thing.