gpt4 book ai didi

amazon-web-services - 使用云形成为 DynamoDB 启用 TTL

转载 作者:行者123 更新时间:2023-12-01 09:14:26 26 4
gpt4 key购买 nike

我正在尝试在现有 dynmoDB 表上设置 TTL

出现错误

An error occurred: Incoming - Value of property TimeToLiveSpecification must be an object.

这是我的模板

    Incoming:
Type: AWS::DynamoDB::Table
Properties:
TableName: table-test
KeySchema:
- AttributeName: number
KeyType: HASH
- AttributeName: number2
KeyType: RANGE
AttributeDefinitions:
- AttributeName: number
AttributeType: S
- AttributeName: number2
AttributeType: S
TimeToLiveSpecification:
- AttributeName: TimeToLive
Enabled: true
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2

我可能错过了一些简单的东西,但无法弄清楚

最佳答案

发现了,TimeToLiveSpecification 部分下的 AttributeName 附近有一个错误的 -

Incoming:
Type: AWS::DynamoDB::Table
Properties:
TableName: table-test
KeySchema:
- AttributeName: number
KeyType: HASH
- AttributeName: number2
KeyType: RANGE
AttributeDefinitions:
- AttributeName: number
AttributeType: S
- AttributeName: number2
AttributeType: S
TimeToLiveSpecification:
AttributeName: TimeToLive # <-- stray dash was here
Enabled: true
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2

关于amazon-web-services - 使用云形成为 DynamoDB 启用 TTL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48310931/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com