微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何使用云形成更新dynamodb表

如何解决如何使用云形成更新dynamodb表

如何通过使用云形成为现有的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 expandingonly some resource types currently support importing existing resources into CloudFormation

幸运的是,AWS::DynamoDB::Table当前是这些资源类型之一

要将其中一种受支持的资源类型的现有资源导入CloudFormation,必须使用变更集as described here

导入它们

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。