{"record":{"id":"117bc450086f926b","repo":"kubernetes/kops","slug":"error-listing-routetables-v-117bc4","errorCode":null,"errorMessage":"error listing RouteTables: %v","messagePattern":"error listing RouteTables: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/routetableassociation.go","lineNumber":64,"sourceCode":"\nfunc (e *RouteTableAssociation) Find(c *fi.CloudupContext) (*RouteTableAssociation, error) {\n\tctx := c.Context()\n\tcloud := awsup.GetCloud(c)\n\n\trouteTableID := e.RouteTable.ID\n\tsubnetID := e.Subnet.ID\n\n\tif routeTableID == nil || subnetID == nil {\n\t\treturn nil, nil\n\t}\n\n\trequest := &ec2.DescribeRouteTablesInput{\n\t\tRouteTableIds: []string{fi.ValueOf(routeTableID)},\n\t}\n\n\tresponse, err := cloud.EC2().DescribeRouteTables(ctx, request)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing RouteTables: %v\", err)\n\t}\n\tif response == nil || len(response.RouteTables) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tif len(response.RouteTables) != 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple RouteTables matching tags\")\n\t}\n\trt := response.RouteTables[0]\n\tfor _, rta := range rt.Associations {\n\t\tif aws.ToString(rta.SubnetId) != *subnetID {\n\t\t\tcontinue\n\t\t}\n\t\tactual := &RouteTableAssociation{\n\t\t\tName:       e.Name,\n\t\t\tID:         rta.RouteTableAssociationId,\n\t\t\tRouteTable: &RouteTable{ID: rta.RouteTableId},\n\t\t\tSubnet:     &Subnet{ID: rta.SubnetId},","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/routetableassociation.go#L46-L82","documentation":"RouteTableAssociation.Find looks up the route table by ID via DescribeRouteTables to locate an existing association for a subnet. API errors are wrapped with this message; an empty result correctly returns nil, nil.","triggerScenarios":"DescribeRouteTables by route table ID errors during Find: invalid/deleted table ID, IAM missing ec2:DescribeRouteTables, throttling, or connectivity issues.","commonSituations":"Route table removed out-of-band; CI environment with insufficient IAM; throttled accounts during large reconciles; stale kOps cluster state.","solutions":["Verify the route table ID exists via AWS CLI describe-route-tables","Check IAM permissions for ec2:DescribeRouteTables","Re-run the reconcile after transient AWS failures","Inspect the wrapped AWS error code to target the actual cause"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"aws ec2 describe-route-tables --route-table-ids rtb-123 || echo \"table gone\"","typeGuard":null,"tryCatchPattern":"var aerr smithy.APIError\nif errors.As(err, &aerr) && (aerr.ErrorCode() == \"ThrottlingException\" || aerr.ErrorCode() == \"RequestLimitExceeded\") {\n  backoffAndRetry()\n}","preventionTips":["Keep route tables referenced by associations alive during updates","Grant ec2:DescribeRouteTables to the operator role","Avoid concurrent mass reconciliation to dodge throttling"],"tags":["aws","ec2","routetableassociation","api-error"],"backgroundTag":"aws-api-request-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}