diff --git a/lib/aws/cloud-formation.js b/lib/aws/cloud-formation.js index 46719c6..9c3bc27 100644 --- a/lib/aws/cloud-formation.js +++ b/lib/aws/cloud-formation.js @@ -17,7 +17,9 @@ CloudFormation.prototype.createStack = function(name, templatePath) { return fsp.readFile(templatePath) .then(function(template) { - template = template.toString(); + var newTemplate = JSON.parse(template); + newTemplate.Resources.LambdaFunction.Properties.Code.S3Bucket = name; + template = JSON.stringify(newTemplate).toString(); debug('creating stack; name=', name, '; template=', template);