https://serverless-stack.com/ logo
#help
Title
# help
b

Boris Tane

11/04/2021, 11:23 PM
👋 I just noticed this in the
sst.Table
construct: https://github.com/serverless-stack/serverless-stack/blob/cd3829ea4f004675aed8c5a4823ab8ca9198339c/packages/resources/src/Table.ts#L152 it's not super clear in the docs that you can't have something like this
Copy code
this.table = new sst.Table(this, "table", {
      fields: {
        pk: sst.TableFieldType.STRING,
        sk: sst.TableFieldType.NUMBER,
      },
      primaryIndex: { partitionKey: "pk", sortKey: "sk" },
      stream: true,
      dynamodbTable: {
        stream: dynamodb.StreamViewType.NEW_IMAGE
      }
    });
it indeed rejects the stream in
dynamodbTable
but I had to dig the code to figure that out, not critical, but worth pointing out 😄
t

thdxr

11/04/2021, 11:24 PM
are you using typescript?
We shouldn't include the
stream
field in the type here, I'll make an issue to fix
b

Boris Tane

11/04/2021, 11:25 PM
yep TS
t

thdxr

11/04/2021, 11:26 PM
2 Views