Explaining AWS DynamoDB

Pavol Kutaj
2 min readAug 26, 2024

--

  • Let’s start personally. Werner Voegles is a badass, passionate technologist, loving EDM, CTO of Amazon, blogger at https://www.allthingsdistributed.com/, and video-podcaster of “Now Go Build!” docuseries on solving problems with engineering.
  • Vogels described the deep technical nature of Amazon’s infrastructure work in a paper about Amazon’s Dynamo, the storage engine for Amazon’s shopping cart.
  • In 2007, he wrote an influencing paper describing Dynamo — Amazon’s Highly Available Key-Value Store (https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf)
  • This is a blueprint of what we now call DynamoDB (DDB), and an important milestone in the early history of the cloud
  • DDB is a managed multi-AZ NoSQL datastore with cross-region replication to keep data safe
  • I.e. it is High Availability (HA)
  • It takes a bit to distribute all rights across all AZ → term “eventual consistency”; usually less than a second
  • This means that is you make a write and then immediately after a read — you reflect the old data;
  • If you really need reliably latest data, you can request a strongly consistent read; the downside is that the read may fail in some conditions
  • DDB is usually BASE-compliant as opposed to ACID.
  • There is possibility of ACID compliancy (DDB transactions opening it up to RDBMS capabilities)
  • DDB is priced on throughput, usually
  • You can use autoscalijng per configured min/max capacities.
  • You can use on-demand capacity, there is a small premium price for that — if you don’t know what read/capacity should be

More generally: Relational VS NoSQL DBs

  • Tables and fields support relationships between them
  • NoSQL record is usually self-contained and does not have to relate to any other tables to make sense; the hierarchy is there
  • Together they are called attributes, and many of them form a table
  • Every record must have a unique identifier, in DDB this is called a primary key
  • DDB creates an internal hash, to decide to store the value, it’s also called hash attribute
  • You can key with two attributes, with partition key VS sort key

--

--

Pavol Kutaj

Today I Learnt | Infrastructure Support Engineer at snowplow.io with a passion for cloud infrastructure/terraform/python/docs. More at https://pavol.kutaj.com