Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml validation fails for functions with dash in name #61

Closed
TheDeveloper opened this issue Aug 16, 2017 · 2 comments
Closed

yaml validation fails for functions with dash in name #61

TheDeveloper opened this issue Aug 16, 2017 · 2 comments

Comments

@TheDeveloper
Copy link

TheDeveloper commented Aug 16, 2017

The following works fine:

AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
  FunctionName:
      Type: 'AWS::Serverless::Function'
      Properties:
        Handler: index.handler
        Runtime: nodejs6.10

But when the function name contains a dash, it produces an error:

AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
  Function-Name:
      Type: 'AWS::Serverless::Function'
      Properties:
        Handler: index.handler
        Runtime: nodejs6.10
ERROR: Failed to read the resources line numbers. This usually means that the template contains invalid indentation. Please check it and try again
@pesama pesama self-assigned this Aug 16, 2017
@sanathkr
Copy link
Contributor

This is indeed an invalid template - http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html. LogicalIDs cannot contain dashes.

I completely agree this error is super misleading. We are rewriting goformation now (the package that does template validation). All of these quirks should soon vanish. You will get a silky smooth experience (or I hope so 😀 )

Closing this Issue because it is a user error.

@TheDeveloper
Copy link
Author

Thanks for the info @sanathkr !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants