serverless/serverless · error · ServerlessError

INVALID_CONFIG

INVALID_CONFIG

Error message

error.message

What it means

Error "error.message" thrown in serverless/serverless.

Source

Thrown at packages/serverless/lib/plugins/aws/api-gateway-service-proxy/api-gateway/validate.js:14

import { ServerlessError, ServerlessErrorCodes } from '@serverless/util'
import _ from 'lodash'
import Joi from 'joi'
import schema from './schema.js'

const NOT_FOUND = -1

const validateModule = {
  validateServiceProxies() {
    const proxies = this.getAllServiceProxies()

    const { error } = schema.validate(proxies)
    if (error) {
      throw new ServerlessError(
        error.message,
        ServerlessErrorCodes.general.INVALID_CONFIG,
        { stack: false },
      )
    }

    const corsPreflight = {}

    const events = proxies.map((serviceProxy) => {
      const serviceName = this.getServiceName(serviceProxy)
      const http = serviceProxy[serviceName]
      http.path = http.path.replace(/^\//, '').replace(/\/$/, '')
      http.method = http.method.toLowerCase()
      http.auth = {
        authorizationType: http.authorizationType || 'NONE',
      }

      if (_.has(http, 'authorizerId')) {

View on GitHub (pinned to b9d7ea51c8)

Solutions

  1. Read the validation error detail and correct the API Gateway service proxy event configuration accordingly.

When it happens

Trigger: Thrown at packages/serverless/lib/plugins/aws/api-gateway-service-proxy/api-gateway/validate.js:14 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/f599bc76c953aff2. Report an issue: GitHub.