title: How are primary keys specified with DynamoDB.DocumentClient for NodeJS?
body: <p>I've been reading a lot of documentation, specifically for <code>AWS.DynamoDB.DocumentClient</code>, and I'm trying to figure out how I create a Table / DocumentClient with a specific primary key, like <code>id</code>. My understanding is that primary keys are required, and that "secondary indexes" are nested attributes, but I don't see any constructor params for actually specifying that <code>id</code> will be the primary key.</p>
  
  <p>How can I specify that <code>id</code> should be a Table / DocumentClient's primary key?</p>
  
  <hr>
  
  <p><a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.NodeJs.03.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.NodeJs.03.html</a></p>
  
  <blockquote>
    <p>Note
    The primary key is required. This code adds an item that has a primary key (year, title) and info attributes. The info attribute stores sample JSON that provides more information about the movie.</p>
  </blockquote>