SimpleTable:
Type: AWS:Serverless::SimpleTable
Properties:
TableName: SimpleTable
PrimaryKey:
Name: id
Type: String
sam build
sam deploy
BooksTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Books
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: rv_id
AttributeType: N
- AttributeName: name
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
- AttributeName: rv_id
KeyType: RANGE
LocalSecondaryIndexes:
- IndexName: name-index
KeySchema:
- AttributeName: id
KeyType: HASH
- AttributeName: name
KeyType: RANGE
Projection:
ProjectionType: ALL
sam build
sam deploy
So you have created the Books table with the Local secondary index of name-index
ap-southeast-1