func GetEc2Name(ec2name string, svc *ec2.Client) string {
	params := &ec2.DescribeInstancesInput{
		InstanceIds: []string{ec2name},
	}
	resp, err := svc.DescribeInstances(context.TODO(), params)

	if err != nil {
		panic(err)
	}

	for _, reservation := range resp.Reservations {
		for _, instance := range reservation.Instances {
			return getNameFromTags(instance.Tags)
		}
	}
	return ""
}
// GetEc2Name returns the name of the provided EC2 Resource
GetEc2Name returns the name of the provided EC2 Resource
// GetEc2Name returns the name of the provided EC2 Resource
func GetEc2Name(ec2name string, svc *ec2.Client) string {
	params := &ec2.DescribeInstancesInput{
		InstanceIds: []string{ec2name},
	}
	resp, err := svc.DescribeInstances(context.TODO(), params)
	if err != nil {
		panic(err)
	}
	for _, reservation := range resp.Reservations {
		for _, instance := range reservation.Instances {
			return getNameFromTags(instance.Tags)
		}
	}
	return ""
}
func GetEc2Name ( ec2name string , svc * ec2 . Client ) string { params := & ec2 . DescribeInstancesInput { InstanceIds : [ ] string { ec2name } , } resp , err := svc . DescribeInstances ( context . TODO ( ) , params ) if err != nil { panic ( err ) } for _ , reservation := range resp . Reservations { for _ , instance := range reservation . Instances { return getNameFromTags ( instance . Tags ) } } return " " }
GetEc2Name returns the name of the provided EC2 Resource
GetEc2Name returns the name of the provided EC2 Resource