AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::AppSync::FunctionConfiguration

CfnFunctionConfiguration

The `AWS::AppSync::FunctionConfiguration` resource defines the functions in GraphQL APIs to perform certain operations. You can use pipeline resolvers to attach functions. For more information, see [Pipeline Resolvers](https://docs.aws.amazon.com/appsync/latest/devguide/pipeline-resolvers.html) in the *AWS AppSync Developer Guide* . > When you submit an update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template. To cause this resource to be updated you must change a property value for this resource in the CloudFormation template. Changing the Amazon S3 file content without changing a property value will not result in an update operation. > > See [Update Behaviors of Stack Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html) in the *AWS CloudFormation User Guide* .

Import

import { CfnFunctionConfiguration } from 'aws-cdk-lib/aws-appsync';

Or use the module namespace:

import * as appsync from 'aws-cdk-lib/aws-appsync';
// appsync.CfnFunctionConfiguration

Properties

Configuration passed to the constructor as CfnFunctionConfigurationProps.

apiIdRequired
string

The AWS AppSync GraphQL API that you want to attach using this function.

dataSourceNameRequired
string

The name of data source this function will attach.

nameRequired
string

The name of the function.

codeOptional
string

The `resolver` code that contains the request and response functions. When code is used, the `runtime` is required. The runtime value must be `APPSYNC_JS` .

codeS3LocationOptional
string

The Amazon S3 endpoint.

descriptionOptional
string

The `Function` description.

functionVersionOptional
string

The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

maxBatchSizeOptional
number

The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.

requestMappingTemplateOptional
string

The `Function` request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

requestMappingTemplateS3LocationOptional
string

Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.

responseMappingTemplateOptional
string

The `Function` response mapping template.

responseMappingTemplateS3LocationOptional
string

The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.

runtimeOptional
IResolvable | AppSyncRuntimeProperty

Describes a runtime used by an AWS AppSync resolver or AWS AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.

syncConfigOptional
IResolvable | SyncConfigProperty

Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the AWS AppSync Cheat Sheet

Everything you need to know about AWS AppSync on one page. HD quality, print-friendly.

Download Free Infographic