diff --git a/lib/Serverless.js b/lib/Serverless.js
index <HASH>..<HASH> 100644
--- a/lib/Serverless.js
+++ b/lib/Serverless.js
@@ -80,7 +80,11 @@ class Serverless {
       return BbPromise.resolve();
     }
 
-    // populate variables after --help, otherwise help may fail to print (https://github.com/serverless/serverless/issues/2041)
+    // make sure the command exists before doing anything else
+    this.pluginManager.validateCommand(this.processedInput.commands);
+
+    // populate variables after --help, otherwise help may fail to print
+    // (https://github.com/serverless/serverless/issues/2041)
     this.variables.populateService(this.pluginManager.cliOptions);
 
     // trigger the plugin lifecycle when there's something which should be processed
diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js
index <HASH>..<HASH> 100644
--- a/lib/classes/PluginManager.js
+++ b/lib/classes/PluginManager.js
@@ -150,6 +150,10 @@ class PluginManager {
     return BbPromise.reduce(hooks, (__, hook) => hook(), null);
   }
 
+  validateCommand(commandsArray) {
+    this.getCommand(commandsArray);
+  }
+
   validateOptions(command) {
     _.forEach(command.options, (value, key) => {
       if (value.required && (this.cliOptions[key] === true || !(this.cliOptions[key]))) {
fix Verify that a command is valid before trying to populate variables