【发布时间】:2018-08-03 18:55:00
【问题描述】:
发件人:https://github.com/serverless/examples/blob/master/aws-node-rest-api-with-dynamodb/serverless.yml
resources:
Resources:
TodosDynamoDbTable:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Retain
Properties:
AttributeDefinitions:
-
AttributeName: id
AttributeType: S
KeySchema:
-
AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: ${self:provider.environment.DYNAMODB_TABLE}
DynamoDB 不应该是无模式的吗?为什么要在这里完成吞吐量配置?这个配置应该被提交,对吧?包含特定配置细节的想法是什么?
【问题讨论】:
-
"Schemaless" 不包括不需要为表定义主键。不知道你在期待什么。
标签: aws-lambda amazon-dynamodb serverless-framework