serverless/serverless · error · ServerlessError

API_GATEWAY_REST_API_ID_NOT_RESOLVED

API_GATEWAY_REST_API_ID_NOT_RESOLVED

Error message

Rest API id could not be resolved.
This might be caused by a custom API Gateway configuration.

In given setup stage specific options such as `tracing`, `logs` and `tags` are not supported.

Please update your configuration (or open up an issue if you feel that there's a way to support your setup).

What it means

Error "Rest API id could not be resolved. This might be caused by a custom API Gateway configuration. In given setup stage specific options such as `tracing`, `logs` and `tags` are not supported. Please update your configuration (or open up an issue if you feel that there's a way to support your setup)." thrown in serverless/serverless.

Source

Thrown at packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/hack/update-stage.js:90

            ) {
              return null
            }

            if (!this.hasTracingConfigured && !this.hasLogsConfigured) {
              // Do crash if there are no API Gateway customizations to apply
              return null
            }

            const errorMessage = [
              'Rest API id could not be resolved.\n',
              'This might be caused by a custom API Gateway configuration.\n\n',
              'In given setup stage specific options such as ',
              '`tracing`, `logs` and `tags` are not supported.\n\n',
              'Please update your configuration (or open up an issue if you feel ',
              "that there's a way to support your setup).",
            ].join('')

            throw new ServerlessError(
              errorMessage,
              'API_GATEWAY_REST_API_ID_NOT_RESOLVED',
            )
          }
          return resolveStage
            .call(this)
            .then(ensureStage.bind(this))
            .then(handleTracing.bind(this))
            .then(handleMetrics.bind(this))
            .then(handleLogs.bind(this))
            .then(handleTags.bind(this))
            .then(applyUpdates.bind(this))
            .then(addTags.bind(this))
            .then(removeTags.bind(this))
            .then(removeAccessLoggingLogGroup.bind(this))
        })
    })
  },

View on GitHub (pinned to b9d7ea51c8)

Solutions

  1. Remove stage-specific options (tracing, logs, tags) that rely on resolving the Rest API id when using a custom API Gateway configuration.
  2. Or adjust the setup so provider.apiGateway.restApiId can be resolved, and open an issue if you believe your setup should be supported.

When it happens

Trigger: Thrown at packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/hack/update-stage.js:90 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/bb54a74bd3e43657. Report an issue: GitHub.