code: func New(cnf *config.Config) iface.Backend {
  	backend := &Backend{Backend: common.NewBackend(cnf), cnf: cnf}
  
  	if cnf.DynamoDB != nil && cnf.DynamoDB.Client != nil {
  		backend.client = cnf.DynamoDB.Client
  	} else {
  		sess := session.Must(session.NewSessionWithOptions(session.Options{
  			SharedConfigState: session.SharedConfigEnable,
  		}))
  		backend.client = dynamodb.New(sess)
  	}
  
  	// Check if needed tables exist
  	err := backend.checkRequiredTablesIfExist()
  	if err != nil {
  		log.FATAL.Printf("Failed to prepare tables. Error: %v", err)
  	}
  	return backend
  }
docs: // New creates a Backend instance