code: func (f *Function) Deploy() error {
  	f.Log.Debug("deploying")
  
  	zip, err := f.ZipBytes()
  	if err != nil {
  		return err
  	}
  
  	if err := f.hookDeploy(); err != nil {
  		return err
  	}
  
  	config, err := f.GetConfig()
  
  	if e, ok := err.(awserr.Error); ok {
  		if e.Code() == "ResourceNotFoundException" {
  			return f.Create(zip)
  		}
  	}
  
  	if err != nil {
  		return err
  	}
  
  	if f.configChanged(config) {
  		f.Log.Debug("config changed")
  		return f.DeployConfigAndCode(zip)
  	}
  
  	f.Log.Info("config unchanged")
  	return f.DeployCode(zip, config)
  }
docs: // Deploy generates a zip and creates or deploy the function.
  // If the configuration hasn't been changed it will deploy only code,
  // otherwise it will deploy both configuration and code.