title: create a table with a global secondary index error
body: <p>I am trying to create a table with a global secondary index using the javascript SDK inside of nodejs:</p>
  
  <pre><code>var messagesTableParams = {
      TableName : "Messages",
      KeySchema: [
          { AttributeName: "to", KeyType: "HASH"},  //Partition key
          { AttributeName: "tm", KeyType: "RANGE" }  //Sort key
      ],
      AttributeDefinitions: [
          { AttributeName: "to", AttributeType: "N" },
          { AttributeName: "tm", AttributeType: "N" }
      ],
      ProvisionedThroughput: {
          ReadCapacityUnits: 10,
          WriteCapacityUnits: 10
      },
      GlobalSecondaryIndexes: [
          {
              IndexName: 'fr_indx',
              KeySchema: [
                  { AttributeName: "fr", KeyType: "HASH"},  //Partition key
                  { AttributeName: "tm", KeyType: "RANGE" }  //Sort key
              ],
              AttributeDefinitions: [
                  { AttributeName: "fr", AttributeType: "N" },
                  { AttributeName: "tm", AttributeType: "N" }
              ],
              Projection: {
                  ProjectionType: 'KEYS_ONLY'
              },
              ProvisionedThroughput: {
                  ReadCapacityUnits: 10,
                  WriteCapacityUnits: 10
              }
          }
      ]
  };
  
  dynamodb.createTable(messagesTableParams, function(err, data) {
      if (err) {
          console.error("Unable to create table. Error JSON:", JSON.stringify(err, null, 2));
      } else {
          console.log("Created table. Table description JSON:", JSON.stringify(data, null, 2));
      }
  });
  </code></pre>
  
  <p>But I keep getting the following error and the table is not created:</p>
  
  <blockquote>
    <p>Unable to create table. Error JSON: {   "message": "Unexpected key
    'AttributeDefinitions' found in params.GlobalSecondaryIndexes[0]",<br>
    "code": "UnexpectedParameter",   "time": "2016-01-07T18:51:11.659Z" }</p>
  </blockquote>