Logical ID naming is not following the convention with `-` or `_`
See original GitHub issueThis is a Bug Report
Logical ID naming is not following the convention if lambda function name contains -
or _
.
Description
With this settings:
service: dash
provider:
name: aws
runtime: nodejs6.10
functions:
photo-resize:
handler: handler.hello
photo_recolor:
handler: handler.hi
sls package
produced cloudformation-template-update-stack.json
including folloings:
PhotoDashresizeLambdaFunction
PhotoDashresizeLambdaVersionPSzzisjnTvvYknuXwQOlAvdkQZ67qXYSvgoAi9T8W0
PhotoDashresizeLambdaFunctionQualifiedArn
PhotoUnderscorerecolorLambdaFunction
PhotoUnderscorerecolorLambdaVersionPSzzisjnTvvYknuXwQOlAvdkQZ67qXYSvgoAi9T8W0
PhotoUnderscorerecolorLambdaFunctionQualifiedArn
Expected is like:
PhotoDashResizeLambdaFunction
PhotoUnderscoreRecolorLambdaFunction
as the document says:
This cause trouble when trying to hook S3 event, because we need to overwrite some auto generated resource.
Related to:
Additional Data
Your Environment Information -----------------------------
OS: darwin
Node Version: 6.10.3
Serverless Version: 1.23.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Resources - AWS CloudFormation
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts...
Read more >Define your naming convention - Cloud Adoption Framework
When you construct your naming convention, identify the key pieces of information you want to reflect in a resource name. Different information ...
Read more >Follow parameter naming standards | AWS Partner Solutions
Naming parameters. For parameter names (logical IDs), follow these guidelines: Use Pascal case and begin with an uppercase letter.
Read more >Naming conventions - Terraform Best Practices
There should be no reason to not follow at least these conventions :) Beware that actual cloud resources often have restrictions in allowed...
Read more >Learn SQL: Naming Conventions - SQLShack
Also, using the naming convention is not the rule, but it's desired. While most rules are pretty logical, you could go with some...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @HyperBrain, thank you for your quick reply.
Yeah, I understand the situation. I am fine with leaving it as it is, and updating the document.
Just I hope the naming itself is fixed some day 😉
It may add this to
v2
milestone if we would change the convention.