DataSource - AWS Serverless Application Model
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

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

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

Lambda

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

Type: Lambda

Required: No

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