{"record":{"id":"059850fe6a2f7c4c","repo":"serverless/serverless","slug":"resource-id-for-path-parent-parent-path-is-requ","errorCode":null,"errorMessage":"Resource ID for path ${parent.parent.path} is required","messagePattern":"Resource ID for path (.+?) is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/resources.js","lineNumber":194,"sourceCode":"          )\n        }\n        return r\n      }, {})\n    }\n\n    // cut resource branches from trees\n    const sortedResourceNodes = predefinedResourceNodes.sort(\n      (node1, node2) => node1.level - node2.level,\n    )\n    const validatedTrees = []\n\n    for (let i = sortedResourceNodes.length - 1; i >= 0; i--) {\n      const node = sortedResourceNodes[i]\n      let parent = node\n\n      while (parent && parent.parent) {\n        if (parent.parent.hasMethod && !parent.parent.resourceId) {\n          throw new Error(\n            `Resource ID for path ${parent.parent.path} is required`,\n          )\n        }\n\n        if (parent.parent.resourceId || parent.parent.children.length > 1) {\n          cutBranch(parent)\n          break\n        }\n\n        parent = parent.parent\n      }\n    }\n\n    // get branches that begin from root resource\n    methodNodes.forEach((node) => {\n      let iter = node\n      while (iter) {\n        if (iter.resourceId) {","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/serverless/serverless/blob/b9d7ea51c8cce57cff1207964b9b71123673081f/packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/resources.js#L176-L212","documentation":"Error \"Resource ID for path ${parent.parent.path} is required\" thrown in serverless/serverless.","triggerScenarios":"Thrown at packages/serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/resources.js:194 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Define the missing API Gateway resource for the parent path under provider.apiGateway.resources or ensure the parent path is created by another http event."],"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"}