diff --git a/lib/plugins/aws/deployFunction/index.js b/lib/plugins/aws/deployFunction/index.js index 96f39e024..a6f3ec1b9 100644 --- a/lib/plugins/aws/deployFunction/index.js +++ b/lib/plugins/aws/deployFunction/index.js @@ -32,12 +32,12 @@ class AwsDeployFunction { .spawn('package:function'), 'deploy:function:deploy': () => BbPromise.bind(this) - .then(this.deployFunction) .then(() => { - if (this.options['update-config']) { - this.updateFunctionConfiguration(); + if (!this.options['update-config']) { + this.deployFunction(); } }) + .then(this.updateFunctionConfiguration) .then(() => this.serverless.pluginManager.spawn('aws:common:cleanupTempDir')), }; }