From c64a3b3bbb77032b0a0ee602cf2ecddbc9f8fb32 Mon Sep 17 00:00:00 2001 From: Adam Biggs Date: Fri, 21 Oct 2016 11:37:27 -0700 Subject: [PATCH] fix AWS event stream deploy fails if name contains underscore #2474 --- lib/plugins/aws/deploy/compile/events/stream/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/aws/deploy/compile/events/stream/index.js b/lib/plugins/aws/deploy/compile/events/stream/index.js index 7f4378a0f..07284e90f 100644 --- a/lib/plugins/aws/deploy/compile/events/stream/index.js +++ b/lib/plugins/aws/deploy/compile/events/stream/index.js @@ -85,7 +85,7 @@ class AwsCompileStreamEvents { // get the name of the stream (and remove any non-alphanumerics in it) const streamName = EventSourceArn.split('/')[1]; const normalizedStreamName = streamName[0].toUpperCase() - + streamName.substr(1).replace(/\W/g, ''); + + streamName.substr(1).replace(/[^A-Za-z0-9]/g, ''); // create type specific PolicyDocument statements let streamStatement = {};