@@ -160,6 +160,9 @@ func (v *Validation) validateCreateFleetAuthorization(
160160 createFleetInput := instance .GetCreateFleetInput (nodeClass , karpv1 .CapacityTypeOnDemand , tags , mockLaunchTemplateConfig ())
161161 createFleetInput .DryRun = lo .ToPtr (true )
162162 if _ , err := v .ec2api .CreateFleet (ctx , createFleetInput ); awserrors .IgnoreDryRunError (err ) != nil {
163+ if awserrors .IsRateLimitedError (err ) {
164+ return "" , true , nil
165+ }
163166 if awserrors .IgnoreUnauthorizedOperationError (err ) != nil {
164167 // Dry run should only ever return UnauthorizedOperation or DryRunOperation so if we receive any other error
165168 // it would be an unexpected state
@@ -183,6 +186,9 @@ func (v *Validation) validateCreateLaunchTemplateAuthorization(
183186 createLaunchTemplateInput := launchtemplate .GetCreateLaunchTemplateInput (ctx , opts [0 ], corev1 .IPv4Protocol , "" )
184187 createLaunchTemplateInput .DryRun = lo .ToPtr (true )
185188 if _ , err := v .ec2api .CreateLaunchTemplate (ctx , createLaunchTemplateInput ); awserrors .IgnoreDryRunError (err ) != nil {
189+ if awserrors .IsRateLimitedError (err ) {
190+ return "" , true , nil
191+ }
186192 if awserrors .IgnoreUnauthorizedOperationError (err ) != nil {
187193 // Dry run should only ever return UnauthorizedOperation or DryRunOperation so if we receive any other error
188194 // it would be an unexpected state
@@ -234,7 +240,7 @@ func (v *Validation) validateRunInstancesAuthorization(
234240 if _ , err = v .ec2api .RunInstances (ctx , runInstancesInput ); awserrors .IgnoreDryRunError (err ) != nil {
235241 // If we get InstanceProfile NotFound, but we have a resolved instance profile in the status,
236242 // this means there is most likely an eventual consistency issue and we just need to requeue
237- if awserrors .IsInstanceProfileNotFound (err ) {
243+ if awserrors .IsInstanceProfileNotFound (err ) || awserrors . IsRateLimitedError ( err ) {
238244 return "" , true , nil
239245 }
240246 if awserrors .IgnoreUnauthorizedOperationError (err ) != nil {
0 commit comments