AWS AppSync Datasource

This page shows how to write Terraform and CloudFormation for AWS AppSync Datasource and write them securely.

aws_appsync_datasource (Terraform)

The Datasource in AWS AppSync can be configured in Terraform with the resource name aws_appsync_datasource. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

poc_datasource.tf#L1
resource "aws_appsync_datasource" "poc_ds_person" {
  api_id           = aws_appsync_graphql_api.poc_appsync_api.id
  name             = "ds_person"
  service_role_arn = aws_iam_role.appsync_api.arn
  type             = "AMAZON_DYNAMODB"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an AppSync DataSource.

AWS::AppSync::DataSource (CloudFormation)

The DataSource in AppSync can be configured in CloudFormation with the resource name AWS::AppSync::DataSource. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

The AWS::AppSync::DataSource resource creates data sources for resolvers in AWS AppSync to connect to, such as Amazon DynamoDB, AWS Lambda, and Amazon OpenSearch Service. Resolvers use these data sources to fetch data when clients make GraphQL calls.

Frequently asked questions

What is AWS AppSync Datasource?

AWS AppSync Datasource is a resource for AppSync of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS AppSync Datasource?

For Terraform, the jjoc007/poc-appsync-golang-mongo source code example is useful. See the Terraform Example section for further details.