func (fw *Flywheel) startInstances() error {
	if len(fw.config.Instances) == 0 {
		return nil
	}
	log.Printf("Starting instances %v", fw.config.Instances)
	_, err := fw.ec2.StartInstances(
		&ec2.StartInstancesInput{
			InstanceIds: fw.config.AwsInstances(),
		},
	)
	return err
}
Start EC2 instances
package flywheel
import (
	"log"
	"time"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/autoscaling"
	"github.com/aws/aws-sdk-go/service/ec2"
)
func (fw *Flywheel) Start() error {
	fw.lastStarted = time.Now()
	log.Print("Startup beginning")
	var err error
	err = fw.startInstances()
	if err == nil {
		err = fw.unterminateAutoScaling()
	}
	if err == nil {
		err = fw.startAutoScaling()
	}
	if err != nil {
		log.Printf("Error starting: %v", err)
		return err
	}
	fw.ready = false
	fw.stopAt = time.Now().Add(fw.idleTimeout)
	fw.status = STARTING
	return nil
}