diff --git a/pkg/apis/aws/helper/helper.go b/pkg/apis/aws/helper/helper.go index 2cd32ee0c..f30035bcf 100644 --- a/pkg/apis/aws/helper/helper.go +++ b/pkg/apis/aws/helper/helper.go @@ -134,6 +134,9 @@ func FindImageInCloudProfile( if cloudProfileConfig == nil { return nil, fmt.Errorf("cloud profile config is nil") } + if len(capabilityDefinitions) == 0 { + return nil, fmt.Errorf("capabilityDefinitions must not be empty, use NormalizeCapabilityDefinitions() to ensure defaults") + } machineImages := cloudProfileConfig.MachineImages for _, machineImage := range machineImages {