问题描述
如何通过使用云形成为现有的dynamodb表启用“ PointInTimeRecoverySpecification”。 我尝试过如下所示:
Resources:
mytableenablerecovery:
Properties:
AttributeDeFinitions:
-
AttributeName: ArtistId
AttributeType: S
KeySchema:
-
AttributeName: ArtistId
KeyType: HASH
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"
TableName: mytablename123
Type: "AWS::DynamoDB::Table"
但是它正在创建新表(如果不存在),否则抛出错误“堆栈arn:aws:cloudformation:us-east-中已经存在mytablename123”
解决方法
While the list is expanding,only some resource types currently support importing existing resources into CloudFormation
幸运的是,AWS::DynamoDB::Table
当前是这些资源类型之一
要将其中一种受支持的资源类型的现有资源导入CloudFormation,必须使用变更集as described here
导入它们