// Stop stop all instances func (i Instances) StopAll(client *amazon.Client) { if len(i) == 0 { return } for _, split := range splittedIds(i.Ids(), 500) { _, err := client.StopInstances(split...) if err != nil { fmt.Printf("[%s] stop error: %s\n", client.Region, err) } } }