Back to Serverless

Sync Config

docs/sf/providers/aws/guide/appsync/syncConfig.md

4.29.01.5 KB
Original Source
<!-- title: Serverless Framework - AppSync - Sync Config description: How to configure Delta Sync and conflict resolution for AWS AppSync with the Serverless Framework. short_title: AppSync - Sync Config keywords: [ 'Serverless Framework', 'AppSync', 'Sync Config', 'Delta Sync', 'Conflict Resolution', 'GraphQL', 'AWS', ] -->

Sync Config

Delta Sync configuration for resolvers and pipeline functions.

Quick start

yaml
Query.user:
  dataSource: my-table
  sync:
    conflictDetection: 'VERSION'
    conflictHandler: 'LAMBDA'
    function:
      timeout: 30
      handler: 'functions/userSync.handler'
  • conflictDetection: VERSION or NONE. Defaults to VERSION
  • conflictHandler: When conflictDetection is VERSION, configures how conflict resolution happens. OPTIMISTIC_CONCURRENCY, AUTOMERGE or LAMBDA. Defaults to OPTIMISTIC_CONCURRENCY
  • function: When conflictHandler is LAMBDA, a Lambda function definition as you would define it under the functions section of your serverless.yml file.
  • functionName: When conflictHandler is LAMBDA, the name of the function as defined under the functions section of the serverless.yml file
  • functionAlias: When conflictHandler is LAMBDA, a specific function alias to use.
  • functionArn: When conflictHandler is LAMBDA, the function ARN to use.