kubernetes/kops · error

error listing SQS queues: %v

Error message

error listing SQS queues: %v

What it means

ListQueues failed at the start of SQS task discovery (e.g. for the external-dns / cluster-autoscaler event queue); the AWS SQS API call itself errored — permissions, wrong region, or throttling.

Source

Thrown at upup/pkg/fi/cloudup/awstasks/sqs.go:71

func (q *SQS) CompareWithID() *string {
	return q.ARN
}

func (q *SQS) Find(c *fi.CloudupContext) (*SQS, error) {
	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"]

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check sqs:ListQueues permissions for the credentials in use
  2. Verify the AWS region matches where the queue is expected
  3. Retry after transient throttling errors
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/awstasks/sqs.go:71 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/03c78867c9c527a1. Report an issue: GitHub.