title: How does the DynamoDB partition key work?
body: <p>I'm trying to understand how the partition created for DynamoDB tables.</p>
  
  <p>According to this <a href="https://aws.amazon.com/blogs/database/choosing-the-right-dynamodb-partition-key/" rel="noreferrer">blog</a>, "All items with the same partition key are stored together", so if I have a table with user id from 1 to 1000, does that mean I will have 1000 partition? Or it's up to the "internal hash function", but how do we know how many partitions there will be? </p>
  
  <p>It later suggested using random suffix from 1-10 to evenly distribute data for each partition, but how does it know it will query 10 times for a given invoice number? Is that only when you have 10 partitions? but in this case you could have thousands of invoice numbers, that means the same amount of partitions will be created, and query made to query an invoice number</p>