我将尝试使用AWS Cloudformation和YAML定义创建DynamoDB表。当我从YAML文件中删除Type时,会出现错误提示,提示必须包含Type。因此,我认为我缺少某些内容,但似乎找不到它。
以下是YAML定义内容:
以下是YAML定义内容:
Resources:
devDdbDataTable:
Type: 'AWS::DynamoDB::Table'
Properties:
Tags:
- Key: access_key
Value: '123'
AttributeDefinitions:
- AttributeName: device_id
Type: 'N'
- AttributeName: device_ip
Type: S
- AttributeName: data
Type: S
- AttributeName: created_at
Type: S
- AttributeName: ttl
Type: S
KeySchema:
- AttributeName: device_id
Type: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TimeToLiveSpecification:
AttributeName: ttl
Enabled: true