{"record":{"id":"e5deb9b1654d9b2b","repo":"kubernetes/kops","slug":"error-describing-volumes-v","errorCode":null,"errorMessage":"error describing volumes: %v","messagePattern":"error describing volumes: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/aws/aws.go","lineNumber":665,"sourceCode":"\treturn resourceTrackers, nil\n}\n\nfunc DescribeVolumes(cloud fi.Cloud) ([]ec2types.Volume, error) {\n\tctx := context.TODO()\n\tc := cloud.(awsup.AWSCloud)\n\n\tvar volumes []ec2types.Volume\n\n\tklog.V(2).Infof(\"Listing EC2 Volumes\")\n\trequest := &ec2.DescribeVolumesInput{\n\t\tFilters: BuildEC2Filters(c),\n\t}\n\n\tpaginator := ec2.NewDescribeVolumesPaginator(c.EC2(), request)\n\tfor paginator.HasMorePages() {\n\t\tpage, err := paginator.NextPage(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error describing volumes: %v\", err)\n\t\t}\n\t\tvolumes = append(volumes, page.Volumes...)\n\t}\n\n\treturn volumes, nil\n}\n\nfunc DeleteKeypair(cloud fi.Cloud, r *resources.Resource) error {\n\tctx := context.TODO()\n\tc := cloud.(awsup.AWSCloud)\n\n\tid := r.ID\n\n\tklog.V(2).Infof(\"Deleting EC2 Keypair %q\", id)\n\trequest := &ec2.DeleteKeyPairInput{\n\t\tKeyPairId: &id,\n\t}\n\t_, err := c.EC2().DeleteKeyPair(ctx, request)","sourceCodeStart":647,"sourceCodeEnd":683,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/aws/aws.go#L647-L683","documentation":"DescribeVolumes pages through ec2:DescribeVolumes using the AWS SDK v2 paginator and wraps any page-fetch error in this error. It means the EC2 API failed mid-enumeration of volumes, aborting the listing. The raw AWS error is embedded via %v.","triggerScenarios":"Any NextPage call of the DescribeVolumes paginator fails: UnauthorizedOperation/AuthFailure, RequestLimitExceeded throttling, invalid credentials, or network/endpoint errors while paging.","commonSituations":"IAM role missing ec2:DescribeVolumes; large accounts hitting EC2 rate limits during repeated kops get/cluster listings; expired session tokens on long-running tooling; transient AWS outage.","solutions":["Verify IAM permissions include ec2:DescribeVolumes and credentials are valid.","Retry with exponential backoff on throttling errors (RequestLimitExceeded/Throttling).","Reduce call frequency or scope DescribeVolumes with filters/tags to lower load.","Check AWS health and regional endpoint connectivity."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if _, err := stsClient.GetCallerIdentity(ctx, &sts.GetCallerIdentityInput{}); err != nil { return fmt.Errorf(\"AWS auth failed: %w\", err) }","typeGuard":"func isThrottling(err error) bool { var ae smithy.APIError; return errors.As(err, &ae) && (ae.ErrorCode() == \"RequestLimitExceeded\" || ae.ErrorCode() == \"Throttling\" || ae.ErrorCode() == \"ThrottlingException\") }","tryCatchPattern":"err := retry.Do(func() error { _, err := DescribeVolumes(ctx, req); return err }, retry.Attempts(5), retry.BackOffDelay)\nif err != nil { return fmt.Errorf(\"DescribeVolumes failed after retries: %w\", err) }","preventionTips":["Grant ec2:DescribeVolumes in the automation role's policy.","Serialize or rate-limit kops invocations to avoid RequestLimitExceeded.","Use scoped DescribeVolumes calls with tag filters where possible.","Refresh session credentials for long-running jobs (IRSA/instance roles auto-rotate)."],"tags":["aws","ec2","ebs","api-error"],"backgroundTag":"aws-throttling-request-limit-exceeded","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"}