func (c *Client) NewDashboard(title string) *CloudWatchDashboard {
	return &CloudWatchDashboard{
		Start:          "-PT1H",
		PeriodOverride: "inherit",
		Widgets: []CloudWatchWidget{
			TextWidget(7, 0, 10, 1, title),
		},
	}
}
NewDashboard creates a new dashboard object with title
package aws
import (
	"encoding/json"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/cloudwatch"
	"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
	"github.com/cortexlabs/cortex/pkg/lib/errors"
)
var (
	_dashboardMinWidthUnits  = 1
	_dashboardMaxWidthUnits  = 24
	_dashboardMinHeightUnits = 1
	_dashboardMaxHeightUnits = 1000
)
type CloudWatchDashboard struct {
	Start          string             `json:"start"`
	PeriodOverride string             `json:"periodOverride"`
	Widgets        []CloudWatchWidget `json:"widgets"`
}
type CloudWatchWidget struct {
	Type       string                 `json:"type"`
	X          int                    `json:"x"`
	Y          int                    `json:"y"`
	Width      int                    `json:"width"`
	Height     int                    `json:"height"`
	Properties map[string]interface{} `json:"properties"`
}
type CloudWatchWidgetGrid struct {
	XOrigin      int                `json:"x_origin"`
	YOrigin      int                `json:"y_origin"`
	NumColumns   int                `json:"num_columns"`
	NumRows      int                `json:"num_rows"`
	WidgetHeight int                `json:"widget_height"`
	WidgetWidth  int                `json:"widget_width"`
	Widgets      []CloudWatchWidget `json:"widgets"`
}
func (c *Client) DoesLogGroupExist(logGroup string) (bool, error) {
	_, err := c.CloudWatchLogs().ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{
		LogGroupName: aws.String(logGroup),
	})
	if err != nil {
		if IsErrCode(err, "ResourceNotFoundException") {
			return false, nil
		}
		return false, errors.Wrap(err, "log group "+logGroup)
	}
	return true, nil
}
func (c *Client) CreateLogGroup(logGroup string, tags map[string]string) error {
	_, err := c.CloudWatchLogs().CreateLogGroup(&cloudwatchlogs.CreateLogGroupInput{
		LogGroupName: aws.String(logGroup),
		Tags:         aws.StringMap(tags),
	})
	if err != nil {
		return errors.Wrap(err, "creating log group "+logGroup)
	}
	return nil
}
func (c *Client) DeleteLogGroup(logGroup string) error {
	_, err := c.CloudWatchLogs().DeleteLogGroup(&cloudwatchlogs.DeleteLogGroupInput{
		LogGroupName: aws.String(logGroup),
	})
	if err != nil {
		return errors.Wrap(err, "log group "+logGroup)
	}
	return nil
}
func (c *Client) TagLogGroup(logGroup string, tagMap map[string]string) error {
	tags := map[string]*string{}
	for key, value := range tagMap {
		tags[key] = aws.String(value)
	}
	_, err := c.CloudWatchLogs().TagLogGroup(&cloudwatchlogs.TagLogGroupInput{
		LogGroupName: aws.String(logGroup),
		Tags:         tags,
	})
	if err != nil {
		return errors.Wrap(err, "failed to add tags to log group", logGroup)
	}
	return nil
}