Lambda - 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).

Lambda

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

Syntax

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

YAML

LogicalId: Description: String FunctionArn: String Name: String ServiceRoleArn: String

Properties

Description

The description of your data source.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the Description property of an AWS::AppSync::DataSource resource.

FunctionArn

The ARN for the Lambda function.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the LambdaFunctionArn property of an AWS::AppSync::DataSource LambdaConfig object.

LogicalId

The unique name of your data source.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the Name property of an AWS::AppSync::DataSource resource.

Name

The name of your data source. Specify this property to override the LogicalId value.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the Name property of an AWS::AppSync::DataSource resource.

ServiceRoleArn

The Amazon Identity and Access Management (IAM) service role ARN for the data source. The system assumes this role when accessing the data source.

Note

To revoke access to your data source, remove the Lambda object from your Amazon SAM template.

Type: String

Required: No. If not specified, Amazon SAM will provision Write permissions using Amazon SAM connectors.

Amazon CloudFormation compatibility: This property is passed directly to the ServiceRoleArn property of an AWS::AppSync::DataSource resource.