amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Documentation about making Amplify Datastore work without Amplify CLI (e.g. using existing table, CDK)

Open ruggero-balteri opened this issue 4 years ago • 8 comments
trafficstars

Is your feature request related to a problem? Please describe. I am maintaining my infrastructure via AWS-CDK (instead of using Amplify CLI), but I do use the Amplify JS library for React Native by programmatically generating the aws-export.js file.

Everything works fine and I can use many of the features that Amplify supports, except Amplify Datastore. I love the way you implemented it and I would like to use in my projects, but I still want to maintain my infrastructure in CDK.

How can I do it? Note that I would face the same problem if I wanted to use an existing DynamoDb table + Appsync API, created via the AWS console.

Describe the solution you'd like Can you please describe the requirements for Datastore to work (e.g. graphQL APIs, fields in Dynamodb tables, deltasync table) for an arbitrary DynamoDb table? I have no problem recreating the resources/configurations in CDK

Describe alternatives you've considered I checked the whitepaper but it does not describe any of the required resources/configurations that Amplify CLI performs on the back-end. Similarly, the official documentation does not provide enough information on how to recreate the back-end. An alternative approach would be to simply mimic the resources that the CLI creates in the CF template of a sample app which uses the Datastore, but reverse engineering is never an ideal approach.

Thanks!

ruggero-balteri avatar Feb 25 '21 13:02 ruggero-balteri

@ruggero-balteri I couldn´t have said it better myself. In my opinion, it should be much more integrated and documented.

mattmeye avatar Jun 12 '21 07:06 mattmeye

We would also need to keep CDK managing the infrastructure and plug Amplify on top of this for the added value on development perspectives. For ex, it looks like Amplify CLI / DataStore creates a Cognito user pool (when used for authorization) but cannot get an external reference if created from CDK, right?

fab-mindflow avatar Jun 22 '21 17:06 fab-mindflow

I find myself facing the same dilemma of wanting to integrate CDK and amplify DataStore. Did you ever resolve this?

Thanks

civicevolution avatar Jan 31 '22 08:01 civicevolution

We passed the one year mark on this request, what's the current state @ruggero-balteri ?

timmattison avatar Feb 16 '22 14:02 timmattison

I am facing the same issue trying link flutter amplify libraries with AWS AppSync + DynamoDB

AbderraoufKhodja avatar May 31 '22 13:05 AbderraoufKhodja

up

iamursky avatar Nov 23 '22 15:11 iamursky

A year later and I'm facing the same issue plugging datastore to Appsync created with CDK

jayademola avatar Jan 16 '24 10:01 jayademola

CDK and amplify DataStore Guide 👀 Anyone had any success?

dylan-westbury avatar Apr 04 '25 02:04 dylan-westbury