title: Best Way to Implement Unique ID DynamoDB Swift
body: <p>I am working on an app where users can create posts that uses Amazon DynamoDB. One of the attributes of a post item in the database is <code>postId</code>. I am searching for the best practice to set this value upon creation. So far, I have thought of:</p>
  
  <ol>
  <li>Counting the current items in the DB and then assigning the value as <code>postId = dbcount + 1</code>. I cannot find a count method for DynamoDB using Swift, and the ways I have found (scan &amp; description) are either inefficient or accurate. Also, I thought of the scenario of 2 users posting at the same time.</li>
  <li>I could create a UUID with Swift and set the postId to this value. </li>
  </ol>
  
  <p>Upon these 2 options, which route is better? Is there a preferred industry standard? Option 2 seems to be the better choice, but I am not sure. Are there any other potential alternatives? Thank you!</p>