# CfnFunctionConfigurationProps

Properties for defining a `CfnFunctionConfiguration`.

Extends: CfnFunctionConfigurationProps
Used as props by: CfnFunctionConfiguration

- Source: Generated code
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cfnFunctionConfigurationProps: appsync.CfnFunctionConfigurationProps = {
  apiId: 'apiId',
  dataSourceName: 'dataSourceName',
  name: 'name',

  // the properties below are optional
  code: 'code',
  codeS3Location: 'codeS3Location',
  description: 'description',
  functionVersion: 'functionVersion',
  maxBatchSize: 123,
  requestMappingTemplate: 'requestMappingTemplate',
  requestMappingTemplateS3Location: 'requestMappingTemplateS3Location',
  responseMappingTemplate: 'responseMappingTemplate',
  responseMappingTemplateS3Location: 'responseMappingTemplateS3Location',
  runtime: {
    name: 'name',
    runtimeVersion: 'runtimeVersion',
  },
  syncConfig: {
    conflictDetection: 'conflictDetection',

    // the properties below are optional
    conflictHandler: 'conflictHandler',
    lambdaConflictHandlerConfig: {
      lambdaConflictHandlerArn: 'lambdaConflictHandlerArn',
    },
  },
};
```

## Properties

- `apiId`: string (required) — The AWS AppSync GraphQL API that you want to attach using this function.

- `code`: 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` .

- `codeS3Location`: string — The Amazon S3 endpoint.

- `dataSourceName`: string (required) — The name of data source this function will attach.

- `description`: string — The `Function` description.

- `functionVersion`: string — The version of the request mapping template.

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

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

- `name`: string (required) — The name of the function.

- `requestMappingTemplate`: string — The `Function` request mapping template.

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

- `requestMappingTemplateS3Location`: 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.

- `responseMappingTemplate`: string — The `Function` response mapping template.

- `responseMappingTemplateS3Location`: 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.

- `runtime`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunctionConfiguration.AppSyncRuntimeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnFunctionConfiguration.AppSyncRuntimeProperty.html) — 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.

- `syncConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunctionConfiguration.SyncConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnFunctionConfiguration.SyncConfigProperty.html) — Describes a Sync configuration for a resolver.

  Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
