简体   繁体   English

AWS 放大和 graphql - 外部数据库

[英]AWS amplify and graphql - External Database

I have a full stack amplify app using reactJS, Graphql and aws DynamoDB.我有一个使用 reactJS、Graphql 和 aws DynamoDB 的全栈放大应用程序。 For customer purpose, i need to have the database host in my country (France).出于客户目的,我需要在我的国家(法国)拥有数据库主机。 For now i have 30 tables store in aws dynamoDB, and i use GraphQL API in my front to query my data.现在我有 30 个表存储在 aws dynamoDB 中,我在前面使用 GraphQL API 来查询我的数据。

Is it possible to migrate all the tables and data to a server in france and link it to my aws amplify app and still using graphql API and graphQL Schema to query my new database?是否可以将所有表和数据迁移到法国的服务器并将其链接到我的 aws amplify 应用程序,并且仍然使用 graphql API 和 graphQL 架构来查询我的新数据库?

Kind regards.亲切的问候。

Yes.是的。 An AppSync lambda resolver is commonly used to "proxy" GraphQL calls to a database, which can be AWS or external. AppSync lambda 解析器通常用于将 GraphQL 调用“代理”到数据库,该数据库可以是 AWS 或外部数据库。 This means writing lambda code to make client calls on the database and returning the result to AppSync.这意味着编写 lambda 代码以对数据库进行客户端调用并将结果返回给 AppSync。 Similarly, A http resolver can return data to AppSync from any arbitrary HTTP endpoint like an external REST API.类似地, http 解析器可以将数据从任意 HTTP 端点返回到 AppSync,例如外部 REST ZDB93744238714CADE16

In your case, though, wouldn't it be easier to migrate your DynamoDB tables or your all your app's AWS resources to AWS's eu-west-3 Paris Region ?但是,在您的情况下,将您的 DynamoDB 表或您所有应用程序的 AWS 资源迁移到AWS 的 eu-west-3 Paris Region不是更容易吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM