node.js - AWS DynamoD Table 的 StreamSpecification 属性有什么用途?
问题描述
我正在玩 DynamoDb。我不确定 StreamSpecification 的目的是什么,为什么我们应该或不应该使用它?我已阅读文档Aws - StreamSpecification但它并没有解释它的作用。
MovieTable:
Type: AWS::DynamoDB::Table
Properties:
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: "Name"
AttributeType: "S"
- AttributeName: "Genre"
AttributeType: "S"
- AttributeName: "Rating"
AttributeType: "N"
- AttributeName: "DateReleased"
AttributeType: "S"
KeySchema:
- AttributeName: "Name"
KeyType: "HASH"
- AttributeName: "Genre"
KeyType: "RANGE"
- AttributeName: "Rating"
KeyType: "RANGE"
- AttributeName: "DateReleased"
KeyType: "RANGE"
TimeToLiveSpecification:
AttributeName: ExpireAfter
Enabled: false
SSESpecification:
SSEEnabled: true
解决方案
StreamSpecification
允许您为此表启用可选的DynamoDB流支持。DynamoDB Streams 允许您将表的所有更改作为流读取- 您可以出于各种原因使用它,例如将相同的更改复制到另一个表、检查可疑活动等。您可以在此处阅读有关 DynamoDB Streams 功能的介绍。
如果你不想在你的桌子上启用一个流(因为你不知道这是什么,你可能不知道:-)),你可以忽略StreamSpecification
.
推荐阅读
- java - 在 Websphere WebApp 中将 JUL 重定向到 Log4J2
- python - pytube.exceptions.RegexMatchError:正则表达式模式有 0 个匹配项
- ios - 更新 fcm 插件后 getToken() 出错
- javascript - 需要帮助根据属性将两个数组与对象映射在一起
- java - DataStax Java Driver 4.0:是否支持对象映射?
- markdown - 具有十进制格式的嵌套编号列表
- node.js - node.js 在控制台上获取批量输出
- javascript - 如何确定导致错误的“令牌”?
- matlab - MATLAB 3D 数据简单可视化
- python - 如何使用 tf.image.draw_bounding_boxes 在原始图像上绘制边界框以显示检测到对象的位置?