serverless/serverless · error · Error
Specify either endpoint or domain
Error message
Specify either endpoint or domain
What it means
Error "Specify either endpoint or domain" thrown in serverless/serverless.
Source
Thrown at packages/serverless/lib/plugins/aws/appsync/resources/DataSource.js:113
EventBusArn: config.config.eventBusArn,
}
}
getOpenSearchConfig(config) {
const endpoint =
config.config.endpoint ||
(config.config.domain && {
'Fn::Join': [
'',
[
'https://',
{ 'Fn::GetAtt': [config.config.domain, 'DomainEndpoint'] },
],
],
})
// FIXME: can we validate this and make TS infer mutually eclusive types?
if (!endpoint) {
throw new Error('Specify either endpoint or domain')
}
return {
AwsRegion: config.config.region || { Ref: 'AWS::Region' },
Endpoint: endpoint,
}
}
getRelationalDbConfig(config) {
return {
RdsHttpEndpointConfig: {
AwsRegion: config.config.region || { Ref: 'AWS::Region' },
DbClusterIdentifier: {
'Fn::Join': [
':',
[
'arn',
'aws',
'rds',View on GitHub (pinned to b9d7ea51c8)
Solutions
- Set exactly one of endpoint or domain in the AppSync data source configuration.
When it happens
Trigger: Thrown at packages/serverless/lib/plugins/aws/appsync/resources/DataSource.js:113 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of serverless/serverless@b9d7ea51c8 (2026-08-13).
Data as JSON: /api/errors/880d7e3e91c4ab41.
Report an issue: GitHub.