{"record":{"id":"880d7e3e91c4ab41","repo":"serverless/serverless","slug":"specify-either-endpoint-or-domain","errorCode":null,"errorMessage":"Specify either endpoint or domain","messagePattern":"Specify either endpoint or domain","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/serverless/lib/plugins/aws/appsync/resources/DataSource.js","lineNumber":113,"sourceCode":"      EventBusArn: config.config.eventBusArn,\n    }\n  }\n\n  getOpenSearchConfig(config) {\n    const endpoint =\n      config.config.endpoint ||\n      (config.config.domain && {\n        'Fn::Join': [\n          '',\n          [\n            'https://',\n            { 'Fn::GetAtt': [config.config.domain, 'DomainEndpoint'] },\n          ],\n        ],\n      })\n    // FIXME: can we validate this and make TS infer mutually eclusive types?\n    if (!endpoint) {\n      throw new Error('Specify either endpoint or domain')\n    }\n    return {\n      AwsRegion: config.config.region || { Ref: 'AWS::Region' },\n      Endpoint: endpoint,\n    }\n  }\n\n  getRelationalDbConfig(config) {\n    return {\n      RdsHttpEndpointConfig: {\n        AwsRegion: config.config.region || { Ref: 'AWS::Region' },\n        DbClusterIdentifier: {\n          'Fn::Join': [\n            ':',\n            [\n              'arn',\n              'aws',\n              'rds',","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/serverless/serverless/blob/b9d7ea51c8cce57cff1207964b9b71123673081f/packages/serverless/lib/plugins/aws/appsync/resources/DataSource.js#L95-L131","documentation":"Error \"Specify either endpoint or domain\" thrown in serverless/serverless.","triggerScenarios":"Thrown at packages/serverless/lib/plugins/aws/appsync/resources/DataSource.js:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set exactly one of endpoint or domain in the AppSync data source configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9d7ea51c8cce57cff1207964b9b71123673081f","analyzedAt":"2026-08-13T04:14:40.386Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}