diff --git a/lib/commands/deploy_lambda.js b/lib/commands/deploy_lambda.js index 6a8f7583d..d599c73bc 100644 --- a/lib/commands/deploy_lambda.js +++ b/lib/commands/deploy_lambda.js @@ -509,7 +509,7 @@ Packager.prototype._createDistFolder = Promise.method(function() { // Get ENV file from S3 return _this._JAWS.getEnvFile(_this._region, _this._stage) .then(function(s3ObjData) { - var targetBackDir = path.join(_this._JAWS._meta.projectRootPath, 'back'); + var targetBackDir = path.join(_this._distDir, 'back'); fs.writeFileSync(path.join(targetBackDir, '.env'), s3ObjData.Body); }); });