mirror of
https://github.com/serverless/serverless.git
synced 2026-02-01 16:07:28 +00:00
fix lambda name generation
This commit is contained in:
parent
56bc47ea00
commit
c7afad9e18
@ -212,7 +212,10 @@ module.exports.generateLambdaName = function(awsmJson) {
|
||||
var handlerName = awsmJson.lambda.cloudFormation.Handler.replace('aws_modules', ''),
|
||||
resourceAction = handlerName.substr(0, handlerName.lastIndexOf('/'));
|
||||
|
||||
return 'l' + resourceAction.replace(/\/([a-z])/g, function(g) {
|
||||
//We prefix with an l to make sure the CloudFormation resource map index is unique
|
||||
//we will probably have API gateway resources in their own CF JSON but we dont want to
|
||||
//make that decsision until CF has API gateway support
|
||||
return 'l' + resourceAction.replace(/(\/|-|_)([a-z])/g, function(g) {
|
||||
return g[1].toUpperCase();
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user