cdk-appsync-transformer icon indicating copy to clipboard operation
cdk-appsync-transformer copied to clipboard

Grant access to dinamodb table give "Circular dependency between resources" error

Open EnricoBeltramo opened this issue 3 years ago • 0 comments

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"

EnricoBeltramo avatar Aug 20 '22 20:08 EnricoBeltramo