{"library":"serverless-appsync-plugin","title":"Serverless AppSync Plugin","description":"The `serverless-appsync-plugin` extends the Serverless Framework to enable seamless deployment and management of AWS AppSync GraphQL APIs. Currently at stable version 2.10.5, the plugin receives regular updates, including bug fixes and new features, with several minor releases in late 2025. It differentiates itself by offering deep integration into the Serverless ecosystem, allowing developers to define AppSync schemas, data sources (Lambda, DynamoDB, HTTP, RDS, None), resolvers (VTL and JavaScript), authentication methods (API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT), custom domains, caching, and Web Application Firewall (WAF) configurations directly within their `serverless.yml` or `serverless.ts` files. This declarative approach significantly simplifies the provisioning and updating of complex AppSync infrastructure, providing CLI commands and exposing CloudFormation variables for easy referencing of deployed resources.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install serverless-appsync-plugin"],"cli":{"name":"serverless","version":null}},"imports":["plugins:\n  - serverless-appsync-plugin","// in serverless.yml or serverless.ts\nappSync:\n  name: my-api\n  authentication:\n    type: API_KEY\n  schema: schema.graphql\n  # ... define dataSources, resolvers, etc.","provider:\n  environment:\n    APPSYNC_ID: ${appsync:id}\n    APPSYNC_URL: ${appsync:url}\n    APPSYNC_API_KEY: ${appsync:apiKey.myKey}"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import type { AWS } from '@serverless/typescript';\n\nconst serverlessConfiguration: AWS = {\n  service: 'my-appsync-service',\n  frameworkVersion: '3',\n  plugins: [\n    'serverless-appsync-plugin'\n  ],\n  provider: {\n    name: 'aws',\n    runtime: 'nodejs18.x',\n    region: 'us-east-1',\n    stage: 'dev',\n    environment: {\n      AWS_REGION: '${aws:region}',\n    }\n  },\n  appSync: {\n    name: '${self:service}-${sls:stage}-api',\n    authentication: {\n      type: 'API_KEY',\n    },\n    schema: 'schema.graphql', // Ensure this file exists at the root\n    resolvers: {\n      'Query.hello': {\n        dataSource: 'helloLambda',\n      },\n    },\n    dataSources: {\n      helloLambda: {\n        type: 'AWS_LAMBDA',\n        config: {\n          functionName: 'hello',\n        },\n      },\n    },\n    apiKeys: [\n      {\n        name: 'defaultApiKey',\n      },\n    ],\n  },\n  functions: {\n    hello: {\n      handler: 'src/handlers/hello.handler', // Ensure this file and handler exist\n      events: [\n        {\n          http: {\n            method: 'get',\n            path: '/hello',\n          },\n        },\n      ],\n    },\n  },\n};\n\nmodule.exports = serverlessConfiguration;","lang":"typescript","description":"This quickstart demonstrates a minimal Serverless.ts configuration using the plugin to deploy an AppSync API with an API key, a basic GraphQL schema, a Lambda data source, and a resolver. It sets up a 'hello' query backed by a Lambda function. To run this, you would also need a `schema.graphql` file and a `src/handlers/hello.handler` function.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}