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
{{ message }}
Repository navigation
Lambda invokes fail when Logical Ids are invalid (non-alphanumeric) #686
Description:
I have sam_template file with function name as Cloud_Views. This throws
"error while running samlocal
local start_lambda command is called"
Error:
Steps to reproduce the issue:
Create Sam_template file with one of the funciton name having underscore in it.
Run sam local. sam local start-lambda
Observed result:
"
2018-10-01 11:43:23 local start_lambda command is called
Error:
" Expected result:
No error should be seen
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Linux samlocal 4.4.0-127-generic #153-Ubuntu Output of sam --version:
SAM CLI, version 0.6.0
@nav-agarwal Logical Ids are defined to be alphanumeric (A-Za-z0-9). You will need to update the logical Ids in your template to be valid. We should have further validation locally to force this and ensure errors like this do not occur.
changed the title [-]SamTemplate: Function Names can't have underscore[/-][+]Lambda invokes fail when Logical Ids are invalid (non-alphanumeric)[/+]on Oct 1, 2018
@keetonian Do you think this is something SAM Translator should do? That is validate the LogicalIds of SAM resources (maybe all resources)? CFN-Lint might do this as well, so maybe it worth just using that for the validation instead.
Activity
jfuss commentedon Oct 1, 2018
@nav-agarwal Logical Ids are defined to be alphanumeric (A-Za-z0-9). You will need to update the logical Ids in your template to be valid. We should have further validation locally to force this and ensure errors like this do not occur.
Updating the title and marking as a bug.
[-]SamTemplate: Function Names can't have underscore[/-][+]Lambda invokes fail when Logical Ids are invalid (non-alphanumeric)[/+]jfuss commentedon Dec 27, 2018
@keetonian Do you think this is something SAM Translator should do? That is validate the LogicalIds of SAM resources (maybe all resources)? CFN-Lint might do this as well, so maybe it worth just using that for the validation instead.
Would love to hear your thoughts.
andremrezende commentedon Jan 7, 2020
Hi guys.
Possible it was forgotten.
Let me know any progress, thanks.
keyboardDrummer commentedon Jan 14, 2020
@jfuss Could you explain why the SAM CLI only allows AlphaNumeric characters in Lambda function identifiers?
jfuss commentedon Jan 14, 2020
@keyboardDrummer Please see my above comment: #686 (comment)
jfuss commentedon Feb 11, 2020
The empty error reported was due to some Pythong2.7 support issues we had but currently do not support Python2.7 anymore.
Closing as we report this correctly to the console now.