red*_*off 2 amazon-dynamodb serverless-framework serverless-plugins aws-serverless
使用无服务器框架时如何为 DynamoDB 表启用连续备份?
理想情况下,我会定义一些serverless.yml可以启用自动 DynamoDB 备份的内容
它有点隐藏在几个文档中,但这可以通过在serverless.yml 文件的部分PointInTimeRecoverySpecification中定义来完成,例如resources
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
809 次 |
| 最近记录: |