fix AWS event stream deploy fails if name contains underscore #2474

This commit is contained in:
Adam Biggs 2016-10-21 11:37:27 -07:00
parent 778cd09290
commit c64a3b3bbb

View File

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