- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 Cloudformation 中为我的 DynamoDB 表设置一些属性,但收到此错误:
代码:
DynamoDB:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: UserId
AttributeType: S
- AttributeName: Username
AttributeType: S
- AttributeName: Surname
AttributeType: S
- AttributeName: Email
AttributeType: S
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: UserId
KeyType: HASH
错误:
E3039 The set of Attributes in AttributeDefinitions: ['Email', 'Surname', 'UserId', 'Username'] and KeySchemas: ['UserId'] must match at Resources/User/Properties
最佳答案
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
这里What is Hash and Range Primary Key?您可以找到详尽的答案。
关于amazon-web-services - AttributeDefinitions 和 KeySchema 中的属性集必须在 Resources/DynamoDB/Properties 中匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65797791/
我想在 Cloudformation 中为我的 DynamoDB 表设置一些属性,但收到此错误: 代码: DynamoDB: Type: AWS::DynamoDB::Table Properties
我是一名优秀的程序员,十分优秀!