DataSource
Configure a data source that your GraphQL API resolver can connect to. You can use AWS Serverless Application Model (AWS SAM) templates to configure connections to the following data sources:
-
Amazon DynamoDB
-
AWS Lambda
To learn more about data sources, see Attaching a data source in the AWS AppSync Developer Guide.
Syntax
To declare this entity in your AWS Serverless Application Model (AWS 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
AWS CloudFormation compatibility: This property is unique to AWS SAM and doesn’t have an AWS CloudFormation equivalent.
Lambda
-
Configure a Lambda function as a data source for your GraphQL API resolver.
Type: Lambda
Required: No
AWS CloudFormation compatibility: This property is unique to AWS SAM and doesn’t have an AWS CloudFormation equivalent.