From 4acbbffc2180b8dda7b87f87a3612354ffb28d02 Mon Sep 17 00:00:00 2001 From: Andreas Sommer Date: Wed, 8 Oct 2025 14:37:26 +0200 Subject: [PATCH] Log desired AMI architecture and owner ID on errors --- pkg/cloud/services/ec2/ami.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cloud/services/ec2/ami.go b/pkg/cloud/services/ec2/ami.go index 769280cd8e..aa657313d8 100644 --- a/pkg/cloud/services/ec2/ami.go +++ b/pkg/cloud/services/ec2/ami.go @@ -213,10 +213,10 @@ func DefaultAMILookup(ec2Client common.EC2API, ownerID, baseOS, kubernetesVersio out, err := ec2Client.DescribeImages(context.TODO(), describeImageInput) if err != nil { - return nil, errors.Wrapf(err, "failed to find ami: %q", amiName) + return nil, errors.Wrapf(err, "failed to find AMI with name %q, architecture %q, ownerID %q", amiName, architecture, ownerID) } if out == nil || len(out.Images) == 0 { - return nil, errors.Errorf("found no AMIs with the name: %q", amiName) + return nil, errors.Errorf("found no AMIs with name %q, architecture %q, ownerID %q", amiName, architecture, ownerID) } latestImage, err := GetLatestImage(out.Images) if err != nil {