【问题标题】:serverless dynamodb enable continuous backups无服务器 dynamodb 启用连续备份
【发布时间】:2019-08-25 06:24:40
【问题描述】:

如何在使用无服务器框架时为我的 DynamoDB 表启用连续备份?

理想情况下,我会在 serverless.yml 中定义一些可以启用自动 DynamoDB 备份的内容

【问题讨论】:

    标签: amazon-dynamodb serverless-framework aws-serverless serverless-plugins


    【解决方案1】:

    这在几个文档中有点隐藏,但这可以通过在 serverless.yml 文件的 resources 部分中定义 PointInTimeRecoverySpecification 来完成,例如

    resources:
      Resources:
        developers:
          Type: AWS::DynamoDB::Table
          Properties:
            TableName: myTable
            AttributeDefinitions:
              - AttributeName: myId
                AttributeType: S
            KeySchema:
              - AttributeName: myId
                KeyType: HASH
            ProvisionedThroughput:
              ReadCapacityUnits: 1
              WriteCapacityUnits: 1
            PointInTimeRecoverySpecification:
              PointInTimeRecoveryEnabled: true
    

    【讨论】:

      猜你喜欢
      • 2023-02-16
      • 2022-07-19
      • 2012-10-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-05
      相关资源
      最近更新 更多