You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When functions in the serverless template have two functions where one function starts withj the name of another, the permissions are messed up.
For example
function1 :GetDetailsForUser
function2 :GetDetails
Result is that the permissions for GetDetails are set to the function GetDetailsForUser
When I change the order of the functions in my serverless things work ok.
The plugins has the following code in apiGateway.js: 281 const versionName = _.find(_.keys(versions), version => _.startsWith(version, functionName )); const aliasName = _.find(_.keys(aliases), alias => _.startsWith(alias, functionName ));
The problem is the .startsWith.
Problem can be solved by changing the code to
const versionName = _.find(_.keys(versions), version => _.startsWith(version, functionName + 'LambdaVersion)); const aliasName = _.find(_.keys(aliases), alias => _.startsWith(alias, functionName + 'Alias'));
Please update and deploy this fix
Regards,
Martin
The text was updated successfully, but these errors were encountered:
When functions in the serverless template have two functions where one function starts withj the name of another, the permissions are messed up.
For example
function1 :GetDetailsForUser
function2 :GetDetails
Result is that the permissions for GetDetails are set to the function GetDetailsForUser
When I change the order of the functions in my serverless things work ok.
The plugins has the following code in apiGateway.js: 281
const versionName = _.find(_.keys(versions), version => _.startsWith(version, functionName )); const aliasName = _.find(_.keys(aliases), alias => _.startsWith(alias, functionName ));
The problem is the .startsWith.
Problem can be solved by changing the code to
const versionName = _.find(_.keys(versions), version => _.startsWith(version, functionName + 'LambdaVersion)); const aliasName = _.find(_.keys(aliases), alias => _.startsWith(alias, functionName + 'Alias'));
Please update and deploy this fix
Regards,
Martin
The text was updated successfully, but these errors were encountered: