{"record":{"id":"4ec0cd2a9c13fad6","repo":"kubernetes/kops","slug":"error-getting-sqs-queue-attributes-v","errorCode":null,"errorMessage":"error getting SQS queue attributes: %v","messagePattern":"error getting SQS queue attributes: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/sqs.go","lineNumber":86,"sourceCode":"\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{\n\t\tQueueUrl: aws.String(url),\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing SQS queue tags: %v\", err)\n\t}\n\n\t// We parse both as JSON; if the json forms are equal we pretend the actual value is the expected value\n\tif q.Policy != nil {\n\t\texpectedPolicy, err := fi.ResourceAsString(q.Policy)","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/sqs.go#L68-L104","documentation":"GetQueueAttributes failed while reading MessageRetentionPeriod, Policy and QueueArn from the discovered SQS queue; the AWS API call errored (permissions, deleted queue, throttling).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awstasks/sqs.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check sqs:GetQueueAttributes permissions","Verify the queue still exists and was not concurrently deleted","Retry the apply"],"exampleFix":null,"handlingStrategy":"try-catch","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-12T12:17:11.808Z"}