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 = {};