You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using an existing DynamoDB table with the LambdaToDynamoDB. When I do cdk synth, I receive this error.
TypeError: type of argument existing_table_obj must be one of (aws_cdk.aws_dynamodb.Table, NoneType); got jsii._reference_map.InterfaceDynamicProxy instead
The object that is being passed to the existing_table_obj is <jsii._reference_map.InterfaceDynamicProxy object at 0x10afdbb50>. from_table_name states that it returns an object of type ITable. Perhaps this is the issue? Is there a way to convert ITable to a Table object?
TypeError: type of argument existing_table_obj must be one of (aws_cdk.aws_dynamodb.Table, NoneType); got jsii._reference_map.InterfaceDynamicProxy instead
Environment
**CDK CLI Version :2.72.1
**CDK Framework Version: aws-cdk-lib==2.72.1
**AWS Solutions Constructs Version : aws-solutions-constructs-aws-lambda-dynamodb==2.36.0
**OS : linux
**Language : python
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered:
Sorry for the delay in responding. The issue is the difference between a Table interface (ITable in Typescript) and a Table object (Table in Typescript). The existingTable property requires a Table object, but the Table.from*() functions return an interface (ITable), so can't be used. In this situation, existingTables must be tables that exist elsewhere in this stack vs elsewhere in the account.
This is a drawback of some of the early constructs, later we started accepting Interfaces as props instead of Objects. We're tossing around the idea of a big 3.0.0 release where we could make many of the lessons we learned standard - while these would be very simple to accommodate breaking changes, they would be breaking changes and would require major release.
I'm gonna leave this Issue open for the moment and see if anyone here has any ideas for a workaround.
biffgaut
added
archived
This will not be implemented.
addressed
Issue is addressed either through a release or further explanation
and removed
bug
Something isn't working
needs-triage
The issue or PR still needs to be triaged
labels
Oct 1, 2024
This is similar to: #119
I am using an existing DynamoDB table with the LambdaToDynamoDB. When I do cdk synth, I receive this error.
TypeError: type of argument existing_table_obj must be one of (aws_cdk.aws_dynamodb.Table, NoneType); got jsii._reference_map.InterfaceDynamicProxy instead
The object that is being passed to the existing_table_obj is <jsii._reference_map.InterfaceDynamicProxy object at 0x10afdbb50>. from_table_name states that it returns an object of type ITable. Perhaps this is the issue? Is there a way to convert ITable to a Table object?
Reproduction Steps
Error Log
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: