Trying DynamoDB for the first time

How it works

The Pricing model

Some things I wish I had known before using DynamoDB

Query Conditions only work on indexes

  1. When you want to search for all items with a condition on a specific attribute, that attribute must be an index (using a KeyConditionExpression). Or, you can use a Scan instead of a Query, however the use of Scans is discouraged as it will always scan the whole database and thus consume a lot of RCUs.
  2. You cannot query multiple items. Let’s say you want to query 10 items with ids of random-uuid-1 up to random-uuid-10. You cannot do this using a Query, because KeyConditionExpressions don't have an IN operator and don't allow the OR operator:

Cannot use boolean types on indexes

No way to get a random item

  • How do we get the maxId in DynamoDB without scanning the whole DB?
  • We end up with holes if we remove items. These holes are not easy to fix.
  • This probably doesn’t give a good partitioning of the table which can lead to performance problems.
  • The indexes item is quite big and consumes many RCU. Items may not exceed 400 KB in DynamoDB, therefore you may need to split up the indexes item into several onces, making this approach more complicated.
  • You’re accessing one item (indexes) a lot of times which can lead to performance problems.

--

--

--

Full Stack Software Engineer #javascript #EOS. Into Recreational Math / CS 🤯 Just message me about anything, my mind is open.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What’s all the buff about PROTOBUF

TryHackMe — Walkthroughs

Prioritising your application transformation

Rise and Fall of Atlassian?

Python Loops

What I’ve Recently Learned in CSS

Animation deep dive

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christoph Michel

Christoph Michel

Full Stack Software Engineer #javascript #EOS. Into Recreational Math / CS 🤯 Just message me about anything, my mind is open.

More from Medium

Fine Details of AWS Lambda Function URL Feature

AWS Certified Solution Architect — Aurora

101 AWS Lambda tutorial for Go developers — API Gateway (Part 2)

Use of AWS CloudFront with Lambda@Edge for S3 accessing