DataSource - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DataSource

Configure a data source that your GraphQL API resolver can connect to. You can use Amazon Serverless Application Model (Amazon SAM) templates to configure connections to the following data sources:

  • Amazon DynamoDB

  • Amazon Lambda

To learn more about data sources, see Attaching a data source in the Amazon AppSync Developer Guide.

Syntax

To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.

YAML

DynamoDb: DynamoDb Lambda: Lambda

Properties

DynamoDb

Configure a DynamoDB table as a data source for your GraphQL API resolver.

Type: DynamoDb

Required: No

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn’t have an Amazon CloudFormation equivalent.

Lambda

Configure a Lambda function as a data source for your GraphQL API resolver.

Type: Lambda

Required: No

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn’t have an Amazon CloudFormation equivalent.