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

The CloudFormation template is invalid: Template format error: Resource name BasicAuthenticationApiGatewayAuthorizerproject-dev is non alphanumeric #140

Closed
ziadloo opened this issue Oct 16, 2018 · 3 comments

Comments

@ziadloo
Copy link

ziadloo commented Oct 16, 2018

I have the following definition file:

service:                            SLS-Test

provider:
  name:                             aws
  stage:                            ${opt:stage, 'project-dev'}
  runtime:                          nodejs8.10
  role:                             arn:aws:iam::************:role/lambda_role

functions:
    basicAuthentication:
        name:                       test-basicAuthentication
        handler:                    basicAuthentication.handler
        environment:
            AUTH_PASS:              ${opt:x_password}
            AUTH_USER:              ${opt:x_user}

    f1:
        handler:                    hello_world.handler
        name:                       hello
        events:
            - http:
                integration:        lambda
                path:               helloWorld
                method:             get
                authorizer:         basicAuthentication

plugins:
  - serverless-aws-alias
  - serverless-prune-plugin

And I try to deploy it like this:

sls deploy --region us-east-1 --stage project-dev --alias project-dev --x_user me --x_password 123

And it results in the following error:

Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Preparing alias ...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (1.86 MB)...
Serverless: Validating template...
 
  Error --------------------------------------------------
 
  The CloudFormation template is invalid: Template format error: Resource name BasicAuthenticationApiGatewayAuthorizerproject-dev is non alphanumeric.
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           8.10.0
     Serverless Version:     1.32.0
@ziadloo
Copy link
Author

ziadloo commented Dec 12, 2018

I created a pull request for this: #149

I appreciate it if someone could take a look into this.

@ziadloo
Copy link
Author

ziadloo commented Jan 3, 2019

@HyperBrain, I appreciate it if you could take a look at this pull request. I need this published for my project. Thanks.

@Enase
Copy link
Contributor

Enase commented Jun 12, 2019

colsed by #149

@Enase Enase closed this as completed Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants