Generates a partial DynamoDB CreateTableCommandInput object for a given EntityManager. Properties generated:

  • AttributeDefinitions
  • GlobalSecondaryIndexes
  • KeySchema
const entityManager = new EntityManager(config);
const entityClient = new EntityClient({region: 'us-east-1});
const tableDefinition = generateTableDefinition(entityManager);

await entityClient.createTable({...tableDefinition, TableName: 'user'});