Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AppSync]: dynamodb source doesn't support imported table #8618

Closed
1 task
nirvana124 opened this issue Jun 18, 2020 · 4 comments · Fixed by #8790
Closed
1 task

[AppSync]: dynamodb source doesn't support imported table #8618

nirvana124 opened this issue Jun 18, 2020 · 4 comments · Fixed by #8790
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync @aws-cdk/aws-dynamodb Related to Amazon DynamoDB effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.

Comments

@nirvana124
Copy link
Contributor

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

  • [✔️] 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@nirvana124 nirvana124 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 18, 2020
@github-actions github-actions bot added @aws-cdk/aws-appsync Related to AWS AppSync @aws-cdk/aws-dynamodb Related to Amazon DynamoDB labels Jun 18, 2020
@MrArnoldPalmer MrArnoldPalmer added effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 18, 2020
@tyroneerasmus
Copy link

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

@tyroneerasmus
Copy link

A similar issue was solved here: #6635

@kennu
Copy link

kennu commented Jun 29, 2020

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).

@MrArnoldPalmer
Copy link
Contributor

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.

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jun 29, 2020
@mergify mergify bot closed this as completed in #8790 Jul 8, 2020
mergify bot pushed a commit that referenced this issue Jul 8, 2020
As of now if your table is created in another stack and you want to use it as data source in graphql api. It is not allowed.
With these changes you can import existing table as data source.
fixes #8618 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync @aws-cdk/aws-dynamodb Related to Amazon DynamoDB effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants