Summary
Every synth() that grants against a TableV2 emits two deprecation warnings that consumers cannot act on:
[WARNING] aws-cdk-lib.aws_dynamodb.TableGrantsProps#encryptedResource is deprecated.
- Leave this field undefined. ... This API will be removed in the next major release.
[WARNING] aws-cdk-lib.aws_dynamodb.TableGrantsProps#policyResource is deprecated.
- Leave this field undefined. ... This API will be removed in the next major release.
Surfaced while investigating the CI timeouts on #329 (fixed in #337).
It is not our call site
packages/dynamodb/src/grants.ts calls the plain native methods and never passes those props:
read: capability((table, grantee) => {
table.grantReadData(grantee);
}),
Isolated it to TableV2 specifically, with a script using only aws-cdk-lib and no ComposureCDK:
| construct |
grantReadData |
grantReadWriteData |
grantFullAccess |
Table (v1) |
0 warnings |
0 |
0 |
TableV2 |
2 warnings |
2 |
2 |
So aws-cdk-lib's own TableV2 grant path constructs TableGrants with the deprecated props internally. Reproduced on aws-cdk-lib@2.262.1.
Why it still matters to us
TableV2Builder is shipped library code, so every consumer using tableGrants.* against a v2 table sees these warnings on every synth, with no way to silence them and nothing to fix in their own code. Two of our own examples trigger it: crud-api-app.ts and clean-desk-policy.ts.
The props are marked for removal in the next major, so this should resolve upstream — but it is worth tracking rather than rediscovering.
Suggested actions
No change to ComposureCDK is indicated today — the call sites are already correct.
Summary
Every
synth()that grants against aTableV2emits two deprecation warnings that consumers cannot act on:Surfaced while investigating the CI timeouts on #329 (fixed in #337).
It is not our call site
packages/dynamodb/src/grants.tscalls the plain native methods and never passes those props:Isolated it to
TableV2specifically, with a script using onlyaws-cdk-liband no ComposureCDK:grantReadDatagrantReadWriteDatagrantFullAccessTable(v1)TableV2So aws-cdk-lib's own
TableV2grant path constructsTableGrantswith the deprecated props internally. Reproduced onaws-cdk-lib@2.262.1.Why it still matters to us
TableV2Builderis shipped library code, so every consumer usingtableGrants.*against a v2 table sees these warnings on every synth, with no way to silence them and nothing to fix in their own code. Two of our own examples trigger it:crud-api-app.tsandclean-desk-policy.ts.The props are marked for removal in the next major, so this should resolve upstream — but it is worth tracking rather than rediscovering.
Suggested actions
aws-cdk-liband check whether an upstream issue already existsNo change to ComposureCDK is indicated today — the call sites are already correct.