SMT*_*ing 9 yaml serverless aws-serverless
我收到String is longer than the maximum length of 1.yaml-schema: AWSDynamoDBTableAttributeDefinition 以下代码块的错误
TodosTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Todos-${self:provider.stage}
AttributeDefinitions:
- AttributeName: todoId
AttributeType: S
- AttributeName: createdAt
AttributeType: S
- AttributeName: name
AttributeType: S
- AttributeName: dueDate
AttributeType: S
KeySchema:
- AttributeName: todoId
KeyType: HASH
- AttributeName: createdAt
KeyType: RANGE
BillingMode: PAY_PER_REQUEST
StreamSpecification:
StreamViewType: NEW_IMAGE
LocalSecondaryIndexes:
- IndexName: todoNameIndex
KeySchema:
- AttributeName: todoId
KeyType: HASH
- AttributeName: name
KeyType: RANGE
Projection:
ProjectionType: ALL
Run Code Online (Sandbox Code Playgroud)
解释: yaml 模式似乎将AttributeName与混淆了AttributeType。因为它期望字符串只有一个字符。
这是如何固定的?
| 归档时间: |
|
| 查看次数: |
217 次 |
| 最近记录: |