func (factory *ClientFactoryAWS) GetEc2Client(config csasession.SessionConfig) (EC2Client, error) {
	sess, err := factory.sessionFactory.GetSession(config)
	if err != nil {
		return nil, err
	}
	client := ec2.New(sess)
	return AWSEC2Client{api: client}, nil
}
GetEc2Client creates a new EC2 client from cached session.
package clientfactory
import (
	"github.com/Appliscale/cloud-security-audit/csasession"
	"github.com/aws/aws-sdk-go/service/iam"
	"github.com/aws/aws-sdk-go/service/ec2"
	"github.com/aws/aws-sdk-go/service/kms"
	"github.com/aws/aws-sdk-go/service/s3"
)
type ClientFactory interface {
	GetKmsClient(config csasession.SessionConfig) (KmsClient, error)
	GetEc2Client(config csasession.SessionConfig) (EC2Client, error)
	GetS3Client(config csasession.SessionConfig) (S3Client, error)
	GetIAMClient(config csasession.SessionConfig) (IAMClient, error)
}
func (factory *ClientFactoryAWS) GetKmsClient(config csasession.SessionConfig) (KmsClient, error) {
	sess, err := factory.sessionFactory.GetSession(config)
	if err != nil {
		return nil, err
	}
	client := kms.New(sess)
	return AWSKmsClient{api: client}, nil
}