Connect DynamoDB and TimestreamDB with AppSync

0

I have 2 databases that I am using, first DynamoDB and second one is TimestreamDB. And I am trying to query from both the databases using AppSync Graphql API. for that I am adding multiple dynamo tables as separate data sources, and for timestream I am creating VPC endpoint for TimestreamDB, and adding HTTP data source for that. Now the question is, I can create schema, query and resolvers for Dynamo Tables. And the AWS AppSync documentation says that for now, only public endpoints are working with AppSync. Ref:"https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-http-resolvers.html" So is there any other way I can satisfy my requirements of connecting Timestream HTTP endpoint with AppSYnc?

1 Answer
0

As of 8/2023, AppSync does not support HTTP resolvers to VPC endpoints.

However, there is a clear and well-defined pattern for accessing VPC endpoints using Lambda resolvers. A Lambda function connected to the VPC will basically proxy the AppSync requests and allow AppSync to fetch data from any VPC endpoints.

High level steps To access Amazon VPC resources from an AWS AppSync GraphQL API, follow these steps:

  1. Create an AWS Lambda function to run inside the same Amazon VPC as the resources that you want to access.
  2. Create an AWS AppSync API, and then attach the Lambda function as the data source.
  3. Configure the AWS AppSync API schema.
  4. Attach either a Lambda resolver or a direct Lambda resolver to the target GraphQL field.
  5. Test the GraphQL field.

Please see this guide for more detailed steps: https://repost.aws/knowledge-center/appsync-access-private-resources-in-vpc

profile pictureAWS
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions