cdk-appsync-transformer
cdk-appsync-transformer copied to clipboard
Grant access to dinamodb table give "Circular dependency between resources" error
There is a way to give a access from a function used as resolver to a dinamobdb table just create by transformer?
I tried those operations:
// create app sync const api = new cdk_appsync_transformer.AppSyncTransformer(...)
// created function lambda const functionApi = new lambda.Function(...)
// add function as resolver api.addLambdaDataSourceAndResolvers(....,functionApi )
// get a table const tablename= api.tableMap.UserTable.tableName const tableToAccess = ddb.Table.fromTableName(..., tablename);
// grant accesss to table to function tableToAccess .grantFullAccess(functionApi )
once I do that, I have error of "Circular dependency between resources"