我正在尝试使用无服务器框架创建一个表,即使我已经为GSI指定了Projection,无服务器也在抱怨Property投影不能为空。我的语法错了吗?如果我删除了GSI部分,它可以正常工作。
Table1:
Type: "AWS::DynamoDB::Table"
Properties:
AttributeDefinitions:
- AttributeName: "uid"
AttributeType: "S"
- AttributeName: "bid"
AttributeType: "S"
KeySchema:
- AttributeName: "uid"
KeyType: "HASH"
- AttributeName: "bid"
KeyType: "RANGE"
GlobalSecondaryIndexes:
- IndexName: "bid-uid-index"
- KeySchema:
- AttributeName: "bid"
KeyType: "HASH"
- AttributeName: "uid"
KeyType: "RANGE"
- Projection:
- ProjectionType: "ALL"
- ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: "Table1"
答案 0 :(得分:1)
没关系,我的语法错了
$sp
长宁上面修正了错误...