You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过CloudFormation创建Amazon DynamoDB表,能否配置Point In Time Recovery?

可以通过CloudFormation为DynamoDB表配置Point In Time Recovery

当然可以!你完全可以通过AWS CloudFormation来为创建的Amazon DynamoDB表开启Point In Time Recovery(PITR)功能。

在CloudFormation的AWS::DynamoDB::Table资源定义中,你需要使用PointInTimeRecoverySpecification属性来配置PITR,通过设置PointInTimeRecoveryEnabled为true即可开启该功能(默认值为false,即关闭状态)。

下面是一个简单的CloudFormation YAML示例,展示如何创建一个开启了PITR的DynamoDB表:

Resources:
  MyPITREnabledTable:
    Type: AWS::DynamoDB::Table
    Properties:
      TableName: MySampleTableWithPITR
      AttributeDefinitions:
        - AttributeName: ItemId
          AttributeType: S
      KeySchema:
        - AttributeName: ItemId
          KeyType: HASH
      # 按需计费模式示例,也可以替换为预配置吞吐量配置
      BillingMode: PAY_PER_REQUEST
      PointInTimeRecoverySpecification:
        PointInTimeRecoveryEnabled: true

额外说明:

  • 开启PITR后,DynamoDB会自动为你的表创建连续备份,你最多可以恢复到过去35天内的任意时间点。
  • 无论是预配置吞吐量模式还是按需计费模式的表,都支持通过CloudFormation配置PITR。
  • 如果你后续需要关闭PITR,只需要将PointInTimeRecoveryEnabled改为false并更新CloudFormation栈即可。

内容的提问来源于stack exchange,提问作者ethrbunny

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:27:00