Aws-cdk: [AppSync]: dynamodb source doesn't support imported table

Created on 18 Jun 2020  路  4Comments  路  Source: aws/aws-cdk

Adding dynamodb source to graphQL api doesn't support imported table.

Use Case

I have a table lets say 'Customer' that is created in another application and i want to add customer table as a data source in graphql api in another application.

Proposed Solution

Change table: Table argument to table: ITable in addDynamoDbDataSource method and DynamoDbDataSourceProps.

Other

  • [鉁旓笍] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

@aws-cdaws-appsync @aws-cdaws-dynamodb efforsmall feature-request in-progress

Most helpful comment

Yeah changing from accepting Table to ITable is the right way to go here. Should be relatively simple to implement and non-breaking for users.

All 4 comments

I am facing the same issue.

Am trying to import a table from another stack and get

Error: Object of type @aws-cdk/core.Resource is not convertible to @aws-cdk/aws-dynamodb.Table

P.S. Using Python CDK

A similar issue was solved here: https://github.com/aws/aws-cdk/pull/6635

I'm having the same problem, because I want to create my DynamoDB tables in a separate stack (and possibly import orphaned tables after CloudFormation migrations in the future).

Yeah changing from accepting Table to ITable is the right way to go here. Should be relatively simple to implement and non-breaking for users.

Was this page helpful?
0 / 5 - 0 ratings