aws-dynamodb-scala
aws-dynamodb-scala copied to clipboard
Create table from object definition
In aws-dynamodb-scala, the object which corresponds to the dynamo table like below is required.
object Members extends DynamoTable {
protected val table = "members"
val id = DynamoHashKey[Int]("id")
val country = DynamoRangeKey[String]("country")
val name = DynamoAttribute[String]("name")
val age = DynamoAttribute[Int]("age")
val company = DynamoAttribute[String]("company")
object companyIndex extends DynamoTable.SecondaryIndex {
val index = "companyIndex"
val country = DynamoHashKey[String]("country")
val company = DynamoRangeKey[String]("company")
}
}
Is it possible to create table from the above definition?