Skip to content

Commit cc18666

Browse files
authored
Merge pull request #5703 from AndiDog/log-ami-arch
🌱 Log desired AMI architecture and owner ID on errors
2 parents de75624 + 4acbbff commit cc18666

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cloud/services/ec2/ami.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ func DefaultAMILookup(ec2Client common.EC2API, ownerID, baseOS, kubernetesVersio
213213

214214
out, err := ec2Client.DescribeImages(context.TODO(), describeImageInput)
215215
if err != nil {
216-
return nil, errors.Wrapf(err, "failed to find ami: %q", amiName)
216+
return nil, errors.Wrapf(err, "failed to find AMI with name %q, architecture %q, ownerID %q", amiName, architecture, ownerID)
217217
}
218218
if out == nil || len(out.Images) == 0 {
219-
return nil, errors.Errorf("found no AMIs with the name: %q", amiName)
219+
return nil, errors.Errorf("found no AMIs with name %q, architecture %q, ownerID %q", amiName, architecture, ownerID)
220220
}
221221
latestImage, err := GetLatestImage(out.Images)
222222
if err != nil {

0 commit comments

Comments
 (0)