With v0.10.1, you can now enable DynamoDB streams ...
# general
f
With v0.10.1, you can now enable DynamoDB streams like this:
Copy code
new sst.Table(this, "Notes", {
  fields: {
    noteId: sst.TableFieldType.STRING,
  },
  primaryIndex: { partitionKey: "noteId" },
  stream: true,
  consumers: ["src/consumer1.main", "src/consumer2.main"],
});
More examples here https://docs.serverless-stack.com/constructs/Table#enabling-dynamodb-streams
c
if consumers make sense only with stream, I would have gone with something like:
Copy code
stream: {
  enabled: true,
  consumers: […]
}
(sorry 😛 )
f
haha that’s totally fair.. just in this case, stream takes a boolean or a enum like “NEW_AND_OLD_IMAGES”
but yeah ur point still stand
c
oh I see, stream can be multi-type
f
yeah i just wanted to add a ‘true’ value and pick a sensible default for those who just want to get started quickly