code: func New(cfg Config) (*Log, error) {
  	l := log.WithFields(log.Fields{
  		trace.Component: teleport.Component(teleport.ComponentDynamoDB),
  	})
  	l.Info("Initializing event backend.")
  
  	if err := cfg.CheckAndSetDefaults(); err != nil {
  		return nil, trace.Wrap(err)
  	}
  	b := &Log{
  		Entry:  l,
  		Config: cfg,
  	}
  	// create an AWS session using default SDK behavior, i.e. it will interpret
  	// the environment and ~/.aws directory just like an AWS CLI tool would:
  	sess, err := awssession.NewSessionWithOptions(awssession.Options{
  		SharedConfigState: awssession.SharedConfigEnable,
  	})
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	// override the default environment (region + credentials) with the values
  	// from the YAML file:
  	if cfg.Region != "" {
  		sess.Config.Region = aws.String(cfg.Region)
  	}
  
  	// create DynamoDB service:
  	b.svc = dynamodb.New(sess)
  
  	// check if the table exists?
  	ts, err := b.getTableStatus(b.Tablename)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	switch ts {
  	case tableStatusOK:
  		break
  	case tableStatusMissing:
  		err = b.createTable(b.Tablename)
  	case tableStatusNeedsMigration:
  		return nil, trace.BadParameter("unsupported schema")
  	}
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	err = b.turnOnTimeToLive()
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	return b, nil
  }
docs: // New returns new instance of DynamoDB backend.
  // It's an implementation of backend API's NewFunc