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

did not find expected alphabetic or numeric character #58

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

did not find expected alphabetic or numeric character #58

wnkz opened this issue Aug 16, 2017 · 2 comments

Comments

@wnkz
Copy link

wnkz commented Aug 16, 2017

Hi,
I'm having an issue with the sam local start-api and sam validate commands.

Installed with npm on OSX.

Versions:

  • OSX 10.12.6
  • Docker 17.06.0-ce-mac19 (18663)
  • nvm 0.33.2
  • npm 3.10.10
  • node v6.11.2

Should be able to reproduce with a template.yml like this:

AWSTemplateFormatVersion: '2010-09-09'
Transform: "AWS::Serverless-2016-10-31"

Resources:
  Api:
    Type: "AWS::Serverless::Api"
    Properties:
      DefinitionUri: ./swagger.yml
      StageName: prod
      Variables:
        ModelsFunctionName: !Ref ModelsFunction

  ModelsFunction:
    Type: "AWS::Serverless::Function"
    Properties:
      CodeUri: lambdas/models
      Handler: models.lambda_handler
      Runtime: python3.6
      Environment:
        Variables:
          S3Bucket: !Ref S3Bucket
      Events:
        CreateModel:
          Type: Api
          Properties:
            Path: /models
            Method: POST
            RestApiId: !Ref Api
      Policies:
        -
          Version: "2012-10-17"
          Statement:
            -
              Effect: Allow
              Action:
                - "s3:*"
              Resource:
                - !Sub "arn:aws:s3:::${S3Bucket}"
                - !Sub "arn:aws:s3:::${S3Bucket}/*"

  S3Bucket:
    Type: "AWS::S3::Bucket"
    Properties:
      BucketName: !Sub "foo-${AWS::StackName}-${AWS::Region}-${AWS::AccountId}"

This gets me the following error:

> sam validate
2017/08/16 12:03:37 0.1.0
ERROR:  did not find expected alphabetic or numeric character (line: 38; col: 0)

line 52 is:

                - !Sub "arn:aws:s3:::${S3Bucket}"

YAML file is space indented.

@pesama pesama self-assigned this Aug 16, 2017
@sanathkr
Copy link
Contributor

Fixed in v0.2.0

@TesterYu
Copy link

TesterYu commented Oct 21, 2020

#58 hello i meet this question too
my yml is:
sys_limits:

    • soft nofile 65535

when i run ansible ,there is a question is did not find expected alphabetic or numeric
i need your help thks

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

4 participants