func GetRegionLaunchConfigurations(region string, lcList *LaunchConfigs, search string) error {
	var launchConfigurations []*autoscaling.LaunchConfiguration
	sess := session.Must(session.NewSession(&aws.Config{Region: aws.String(region)}))
	svc := autoscaling.New(sess)
	params := &autoscaling.DescribeLaunchConfigurationsInput{}
	more := true
	for more == true {
		result, err := svc.DescribeLaunchConfigurations(params)
		if err != nil {
			return err
		}
		launchConfigurations = append(launchConfigurations, result.LaunchConfigurations...)
		if aws.StringValue(result.NextToken) == "" {
			more = false
		} else {
			params.NextToken = result.NextToken
		}
	}
	if len(launchConfigurations) == 0 {
		return nil
	}
	secGrpList := new(SecurityGroups)
	err := GetRegionSecurityGroups(region, secGrpList, "")
	if err != nil {
		return nil
	}
	imgList := new(Images)
	GetRegionImages(region, imgList, "", false)
	lc := make(LaunchConfigs, len(launchConfigurations))
	for i, config := range launchConfigurations {
		lc[i].Marshal(config, region, secGrpList, imgList)
	}
	if search != "" {
		term := regexp.MustCompile(search)
	Loop:
		for i, c := range lc {
			rLc := reflect.ValueOf(c)
			for k := 0; k < rLc.NumField(); k++ {
				sVal := rLc.Field(k).String()
				if term.MatchString(sVal) {
					*lcList = append(*lcList, lc[i])
					continue Loop
				}
			}
		}
	} else {
		*lcList = append(*lcList, lc[:]...)
	}
	return nil
}
GetRegionLaunchConfigurations returns a slice of Launch Configurations into the provided LaunchConfigs slice that match the region and search term
package aws
import (
	"encoding/base64"
	"errors"
	"fmt"
	"os"
	"reflect"
	"regexp"
	"sort"
	"strings"
	"sync"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/autoscaling"
	"github.com/aws/aws-sdk-go/service/ec2"
	humanize "github.com/dustin/go-humanize"
	"github.com/hashicorp/hil"
	"github.com/hashicorp/hil/ast"
	"github.com/murdinc/awsm/aws/regions"
	"github.com/murdinc/awsm/config"
	"github.com/murdinc/awsm/models"
	"github.com/murdinc/terminal"
	"github.com/olekukonko/tablewriter"
)
type LaunchConfigs []LaunchConfig
type LaunchConfig models.LaunchConfig
func GetLaunchConfigurationName(region, class string, version int) string {
	name := fmt.Sprintf("%s-v%d", class, version)
	_, err := GetLaunchConfigurationsByName(region, name)
	if err != nil {
		return ""
	}
	return name
}
func GetLaunchConfigurationVersion(class string, previous bool) (int, error) {
	cfg, err := config.LoadLaunchConfigurationClass(class)
	if err != nil {
		return -1, err
	}
	if previous && cfg.Version > 0 {
		cfg.Version--
	}
	return cfg.Version, nil
}
func GetLaunchConfigurationsByName(region, name string) (LaunchConfigs, error) {
	sess := session.Must(session.NewSession(&aws.Config{Region: aws.String(region)}))
	svc := autoscaling.New(sess)
	params := &autoscaling.DescribeLaunchConfigurationsInput{
		LaunchConfigurationNames: []*string{
			aws.String(name),
		},
	}
	result, err := svc.DescribeLaunchConfigurations(params)
	if err != nil || len(result.LaunchConfigurations) == 0 {
		return LaunchConfigs{}, err
	}
	secGrpList := new(SecurityGroups)
	err = GetRegionSecurityGroups(region, secGrpList, "")
	imgList := new(Images)
	GetRegionImages(region, imgList, "", false)
	lcList := make(LaunchConfigs, len(result.LaunchConfigurations))
	for i, config := range result.LaunchConfigurations {
		lcList[i].Marshal(config, region, secGrpList, imgList)
	}
	if len(lcList) == 0 {
		return lcList, errors.New("No Launch Configurations found with name of [" + name + "] in [" + region + "].")
	}
	return lcList, err
}
func GetLaunchConfigurations(search string) (*LaunchConfigs, []error) {
	var wg sync.WaitGroup
	var errs []error
	lcList := new(LaunchConfigs)
	regions := GetRegionListWithoutIgnored()
	for _, region := range regions {
		wg.Add(1)
		go func(region *ec2.Region) {
			defer wg.Done()
			err := GetRegionLaunchConfigurations(*region.RegionName, lcList, search)
			if err != nil {
				terminal.ShowErrorMessage(fmt.Sprintf("Error gathering launch config list for region [%s]", *region.RegionName), err.Error())
				errs = append(errs, err)
			}
		}(region)
	}
	wg.Wait()
	return lcList, errs
}