首页 > 解决方案 > DeletePolicy 保留导致问题

问题描述

我正在尝试使用以下代码将现有 ddb 表导入到我的 cf yaml 中:

UserPreferencesDDBTable:
  Type: AWS::DynamoDB::Table
  DeletionPolicy: Retain
  Properties:
    AttributeDefinitions:
      - AttributeName: id
        AttributeType: S
      - AttributeName: subid
        AttributeType: S
    KeySchema:
      - AttributeName: id
        KeyType: HASH
      - AttributeName: subid
        KeyType: RANGE
    SSESpecification:
        SSEEnabled: true
    TableName: 'test-user-preferences'

在云形成堆栈事件中,我看到它正在尝试创建它并失败,因为存在具有此名称的资源。我在这里做错了什么?

标签: amazon-dynamodbyamlamazon-cloudformation

解决方案


推荐阅读