{"record":{"id":"bb54a74bd3e43657","repo":"serverless/serverless","slug":"api-gateway-rest-api-id-not-resolved","errorCode":"API_GATEWAY_REST_API_ID_NOT_RESOLVED","errorMessage":"Rest API id could not be resolved.\nThis might be caused by a custom API Gateway configuration.\n\nIn given setup stage specific options such as `tracing`, `logs` and `tags` are not supported.\n\nPlease update your configuration (or open up an issue if you feel that there's a way to support your setup).","messagePattern":"Rest API id could not be resolved\\.\nThis might be caused by a custom API Gateway configuration\\.\n\nIn given setup stage specific options such as `tracing`, `logs` and `tags` are not supported\\.\n\nPlease update your configuration \\(or open up an issue if you feel that there's a way to support your setup\\)\\.","errorType":"validation","errorClass":"ServerlessError","httpStatus":null,"severity":"error","filePath":"packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/hack/update-stage.js","lineNumber":90,"sourceCode":"            ) {\n              return null\n            }\n\n            if (!this.hasTracingConfigured && !this.hasLogsConfigured) {\n              // Do crash if there are no API Gateway customizations to apply\n              return null\n            }\n\n            const errorMessage = [\n              'Rest API id could not be resolved.\\n',\n              'This might be caused by a custom API Gateway configuration.\\n\\n',\n              'In given setup stage specific options such as ',\n              '`tracing`, `logs` and `tags` are not supported.\\n\\n',\n              'Please update your configuration (or open up an issue if you feel ',\n              \"that there's a way to support your setup).\",\n            ].join('')\n\n            throw new ServerlessError(\n              errorMessage,\n              'API_GATEWAY_REST_API_ID_NOT_RESOLVED',\n            )\n          }\n          return resolveStage\n            .call(this)\n            .then(ensureStage.bind(this))\n            .then(handleTracing.bind(this))\n            .then(handleMetrics.bind(this))\n            .then(handleLogs.bind(this))\n            .then(handleTags.bind(this))\n            .then(applyUpdates.bind(this))\n            .then(addTags.bind(this))\n            .then(removeTags.bind(this))\n            .then(removeAccessLoggingLogGroup.bind(this))\n        })\n    })\n  },","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/serverless/serverless/blob/b9d7ea51c8cce57cff1207964b9b71123673081f/packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/hack/update-stage.js#L72-L108","documentation":"Error \"Rest API id could not be resolved.\nThis might be caused by a custom API Gateway configuration.\n\nIn given setup stage specific options such as `tracing`, `logs` and `tags` are not supported.\n\nPlease update your configuration (or open up an issue if you feel that there's a way to support your setup).\" thrown in serverless/serverless.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Remove stage-specific options (tracing, logs, tags) that rely on resolving the Rest API id when using a custom API Gateway configuration.","Or adjust the setup so provider.apiGateway.restApiId can be resolved, and open an issue if you believe your setup should be supported."],"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"}