{"record":{"id":"fec2a3c651120714","repo":"kubernetes/kops","slug":"found-multiple-sqs-queues-matching-queue-name","errorCode":null,"errorMessage":"found multiple SQS queues matching queue name","messagePattern":"found multiple SQS queues matching queue name","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/sqs.go","lineNumber":77,"sourceCode":"\tctx := c.Context()\n\tcloud := awsup.GetCloud(c)\n\n\tif q.Name == nil {\n\t\treturn nil, nil\n\t}\n\n\tresponse, err := cloud.SQS().ListQueues(ctx, &sqs.ListQueuesInput{\n\t\tMaxResults:      aws.Int32(2),\n\t\tQueueNamePrefix: q.Name,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing SQS queues: %v\", err)\n\t}\n\tif response == nil || len(response.QueueUrls) == 0 {\n\t\treturn nil, nil\n\t}\n\tif len(response.QueueUrls) != 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple SQS queues matching queue name\")\n\t}\n\turl := response.QueueUrls[0]\n\n\tattributes, err := cloud.SQS().GetQueueAttributes(ctx, &sqs.GetQueueAttributesInput{\n\t\tAttributeNames: []sqstypes.QueueAttributeName{sqstypes.QueueAttributeNameMessageRetentionPeriod, sqstypes.QueueAttributeNamePolicy, sqstypes.QueueAttributeNameQueueArn},\n\t\tQueueUrl:       aws.String(url),\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error getting SQS queue attributes: %v\", err)\n\t}\n\tactualPolicy := attributes.Attributes[\"Policy\"]\n\tactualARN := attributes.Attributes[\"QueueArn\"]\n\tperiod, err := strconv.Atoi(attributes.Attributes[\"MessageRetentionPeriod\"])\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error coverting MessageRetentionPeriod to int: %v\", err)\n\t}\n\n\ttags, err := cloud.SQS().ListQueueTags(ctx, &sqs.ListQueueTagsInput{","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/sqs.go#L59-L95","documentation":"ListQueues with the queue-name prefix returned more than one queue URL; kOps expects the SQS queue name it manages to be unique in the account/region and refuses to guess which queue to reconcile.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awstasks/sqs.go:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete or rename the extra queues sharing the name prefix","Use a more specific queue name in the cluster spec to avoid prefix collisions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}