mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
fix AWS event stream deploy fails if name contains underscore #2474
This commit is contained in:
parent
778cd09290
commit
c64a3b3bbb
@ -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 = {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user