func createCloudWatchLogsClientForConfig(awsConfig aws.Config) mockableCloudWatchLogsClient {
	session, _ := awssession.NewSessionWithOptions(
		awssession.Options{
			SharedConfigState: awssession.SharedConfigEnable,
			Config:            awsConfig,
		})
	return concreteCloudWatchLogsClient{
		client: cloudwatchlogs.New(session),
	}
}
Create client wrapped by interface to allow for mocking.
package cmd
import (
	"github.com/aws/aws-sdk-go/aws"
	awsrequest "github.com/aws/aws-sdk-go/aws/request"
	awssession "github.com/aws/aws-sdk-go/aws/session"
	cloudwatchlogs "github.com/aws/aws-sdk-go/service/cloudwatchlogs"
)
type mockableCloudWatchLogsClient interface {
	FilterLogEventsRequest(*cloudwatchlogs.FilterLogEventsInput) (*awsrequest.Request, *cloudwatchlogs.FilterLogEventsOutput)
}
type concreteCloudWatchLogsClient struct {
	client *cloudwatchlogs.CloudWatchLogs
}
func (m concreteCloudWatchLogsClient) FilterLogEventsRequest(input *cloudwatchlogs.FilterLogEventsInput) (*awsrequest.Request, *cloudwatchlogs.FilterLogEventsOutput) {
	req, output := m.client.FilterLogEventsRequest(input)
	return req, output
}