Having an issue after upgrading SST, not sure whic...
# help
r
Having an issue after upgrading SST, not sure which update did it but it looks like I need to now specify the
table.dynamodbTable
to use specific table permissions. so like this
Copy code
permissions: [[userTable.dynamodbTable, 'grantReadData']],
instead of
Copy code
permissions: [[userTable, 'grantReadData']],
Looks like something around here, https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/util/permission.ts#L221 or here https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/Construct.ts#L60. Maybe this got messed up with the update to the latest CDK?
f
Hey Ross, hmm.. it should’ve always been the former:
Copy code
permissions: [[userTable.dynamodbTable, 'grantReadData']],
The
grantX
method is a CDK method, so the first parameter should always be the CDK construct (ie.
userTable.dynamodbTable
), not the SST construct.
Not sure how it’s working for u b4 🤔
r
Oh dang.. huh. Maybe I never spun this up. Just assumed it was working. Good to know though, so that is the normal syntax, ill continue that way.