From dbeaa54832983a09b3940e4d9edd8f4e95249e00 Mon Sep 17 00:00:00 2001 From: zorrofox Date: Fri, 23 Sep 2016 23:04:34 +0800 Subject: [PATCH] fix: #1973 deploy fails with unhelpful error message when service name is not a valid CF stack name --- lib/plugins/aws/deploy/lib/createStack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/aws/deploy/lib/createStack.js b/lib/plugins/aws/deploy/lib/createStack.js index de729ae5f..c62e88ab2 100644 --- a/lib/plugins/aws/deploy/lib/createStack.js +++ b/lib/plugins/aws/deploy/lib/createStack.js @@ -32,7 +32,7 @@ module.exports = { createStack() { const stackName = `${this.serverless.service.service}-${this.options.stage}`; - if (/^[a-zA-Z-]+/.test(stackName) || stackName.length > 128){ + if (/^[a-zA-Z1-9-]+/.test(stackName) || stackName.length > 128){ const errorMessage = [ 'The stack name "' + stackName + '" is not quallify. ', 'A stack name can contain only alphanumeric',