kubernetes/kops · error
found multiple SQS queues matching queue name
Error message
found multiple SQS queues matching queue name
What it means
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.
Source
Thrown at upup/pkg/fi/cloudup/awstasks/sqs.go:77
ctx := c.Context()
cloud := awsup.GetCloud(c)
if q.Name == nil {
return nil, nil
}
response, err := cloud.SQS().ListQueues(ctx, &sqs.ListQueuesInput{
MaxResults: aws.Int32(2),
QueueNamePrefix: q.Name,
})
if err != nil {
return nil, fmt.Errorf("error listing SQS queues: %v", err)
}
if response == nil || len(response.QueueUrls) == 0 {
return nil, nil
}
if len(response.QueueUrls) != 1 {
return nil, fmt.Errorf("found multiple SQS queues matching queue name")
}
url := response.QueueUrls[0]
attributes, err := cloud.SQS().GetQueueAttributes(ctx, &sqs.GetQueueAttributesInput{
AttributeNames: []sqstypes.QueueAttributeName{sqstypes.QueueAttributeNameMessageRetentionPeriod, sqstypes.QueueAttributeNamePolicy, sqstypes.QueueAttributeNameQueueArn},
QueueUrl: aws.String(url),
})
if err != nil {
return nil, fmt.Errorf("error getting SQS queue attributes: %v", err)
}
actualPolicy := attributes.Attributes["Policy"]
actualARN := attributes.Attributes["QueueArn"]
period, err := strconv.Atoi(attributes.Attributes["MessageRetentionPeriod"])
if err != nil {
return nil, fmt.Errorf("error coverting MessageRetentionPeriod to int: %v", err)
}
tags, err := cloud.SQS().ListQueueTags(ctx, &sqs.ListQueueTagsInput{View on GitHub (pinned to 4c8573c808)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/awstasks/sqs.go:77 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/fec2a3c651120714.
Report an issue: GitHub.