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

Endpoints section shows: none #6152

Open
jeromegit opened this issue May 17, 2019 · 3 comments
Open

Endpoints section shows: none #6152

jeromegit opened this issue May 17, 2019 · 3 comments

Comments

@jeromegit
Copy link

This is a Bug Report

Description

I have been following the excellent instructions listed in https://serverless-stack.com/chapters/deploy-your-serverless-infrastructure.html.

After running: sls deploy -v, I was expecting to get a list of endpoints but instead I'm getting "None".

Here's what I'm getting:
(note the endpoints: None) toward the end.

% sls deploy -v
Serverless: Using configuration:
{
  "webpackConfig": "./webpack.config.js",
  "includeModules": true,
  "packager": "npm",
  "packagerOptions": {},
  "keepOutputDirectory": false
}
Serverless: Removing /Users/jerome/serverless-stack-2-api/.webpack
Serverless: Bundling with Webpack...
Time: 1305ms
Built at: 5/17/2019 3:36:03 PM
        Asset      Size  Chunks             Chunk Names
    delete.js  7.02 KiB       0  [emitted]  delete
    update.js  7.52 KiB       1  [emitted]  update
      list.js  7.25 KiB       2  [emitted]  list
       get.js  7.35 KiB       3  [emitted]  get
    create.js  7.14 KiB       4  [emitted]  create
delete.js.map   6.1 KiB       0  [emitted]  delete
update.js.map  6.81 KiB       1  [emitted]  update
  list.js.map  6.34 KiB       2  [emitted]  list
   get.js.map  6.37 KiB       3  [emitted]  get
create.js.map  6.27 KiB       4  [emitted]  create
Entrypoint create = create.js create.js.map
Entrypoint get = get.js get.js.map
Entrypoint list = list.js list.js.map
Entrypoint update = update.js update.js.map
Entrypoint delete = delete.js delete.js.map
   [0] external "source-map-support/register" 42 bytes {0} {1} {2} {3} {4} [built]
   [1] external "babel-runtime/core-js/json/stringify" 42 bytes {0} {1} {2} {3} {4} [built]
   [2] ./libs/response-lib.js 762 bytes {0} {1} {2} {3} {4} [built]
   [3] external "aws-sdk" 42 bytes {0} {1} {2} {3} {4} [built]
   [4] ./libs/dynamodb-lib.js 468 bytes {0} {1} {2} {3} {4} [built]
   [5] external "babel-runtime/helpers/asyncToGenerator" 42 bytes {0} {1} {2} {3} {4} [built]
   [6] external "babel-runtime/regenerator" 42 bytes {0} {1} {2} {3} {4} [built]
   [7] ./delete.js 2.35 KiB {0} [built]
   [8] ./update.js 2.84 KiB {1} [built]
   [9] ./list.js 2.56 KiB {2} [built]
  [10] ./get.js 2.65 KiB {3} [built]
  [11] external "uuid" 42 bytes {4} [built]
  [12] ./create.js 2.33 KiB {4} [built]
Serverless: Fetch dependency graph from /Users/jerome/serverless-stack-2-api/package.json
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: source-map-support@^0.4.18, babel-runtime@^6.26.0, uuid@^3.2.1
Serverless: Package took [23165 ms]
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: INFO: Runtime dependency 'aws-sdk' found in devDependencies. It has been excluded automatically.
Serverless: Copy modules: /Users/jerome/serverless-stack-2-api/.webpack/service [751 ms]
Serverless: Prune: /Users/jerome/serverless-stack-2-api/.webpack/service [1427 ms]
Serverless: Run scripts: /Users/jerome/serverless-stack-2-api/.webpack/service [1 ms]
Serverless: Zip service: /Users/jerome/serverless-stack-2-api/.webpack/service [2382 ms]
Serverless: Packaging service...
Serverless: Remove /Users/jerome/serverless-stack-2-api/.webpack
Serverless: Service files not changed. Skipping deployment...
Service Information
service: notes-app-2-api
stage: dev
region: us-east-1
stack: notes-app-2-api-dev
resources: 1
api keys:
  None
endpoints:
  None
functions:
  create: notes-app-2-api-dev-create
  get: notes-app-2-api-dev-get
  list: notes-app-2-api-dev-list
  update: notes-app-2-api-dev-update
  delete: notes-app-2-api-dev-delete
layers:
  None

Stack Outputs
ServerlessDeploymentBucketName: notes-app-2-api-dev-serverlessdeploymentbucket-370vn6orhs0d

I have been following the instructions pretty carefully and I was expecting to see some endpoints as shown in the ebook.
Below's the diff between the original/cloned version of serverless.yml and my version after applying the changes.
What am I doing wrong?

% diff /tmp/serverless-stack-2-api/serverless.yml  .
1c1
< service: notes-app-api
---
> service: notes-app-2-api
10a11,21
>   # Our stage is based on what is passed in when running serverless
>   # commands. Or fallsback to what we have set in the provider section.
>   stage: ${opt:stage, self:provider.stage}
>   # Set the table name here so we can use it while testing locally
>   tableName: ${self:custom.stage}-notes
>   # Set our DynamoDB throughput for prod and all other non-prod stages.
>   tableThroughputs:
>     prod: 5
>     default: 1
>   tableThroughput: ${self:custom.tableThroughputs.${self:custom.stage}, self:custom.tableThroughputs.default}
>   # Load our webpack config
18c29
<   stage: prod
---
>   stage: dev
22a34,38
>   # These environment variables are made available to our functions
>   # under process.env.
>   environment:
>     tableName: ${self:custom.tableName}
> 
33,34c49,53
<       Resource: "arn:aws:dynamodb:us-east-1:*:*"
< 
---
>       # Restrict our IAM role permissions to
>       # the specific table for the stage
>       Resource:
>         - "Fn::GetAtt": [ NotesTable, Arn ]
>                                                                                                                     
99a119
> # Create our resources with separate CloudFormation templates
102a123,130
>   # DynamoDB
>   - ${file(resources/dynamodb-table.yml)}
>   # S3
>   - ${file(resources/s3-bucket.yml)}
>   # Cognito
>   - ${file(resources/cognito-user-pool.yml)}
>   - ${file(resources/cognito-identity-pool.yml)}
>   

Additional Data

  • Serverless Framework Version you're using: 1.42.3
  • Operating System: macOS Mojave 10.14
@herebebogans
Copy link
Contributor

herebebogans commented May 19, 2019

It's a litte hard to troubleshoot without the full serverless.yml. Check your indentation around the

events:
    - http:

section

@pmuens pmuens changed the title endpoints section shows: none Wndpoints section shows: none May 20, 2019
@pmuens pmuens changed the title Wndpoints section shows: none Endpoints section shows: none May 20, 2019
@fir0j
Copy link

fir0j commented Mar 22, 2021

events:
  - http:
  4 spaces path:  whatever
  4 spaces method: get

@pgrzesik
Copy link
Contributor

Hello @fir0j - for general support, it is recommended to use our forum (https://forum.serverless.com/) or Slack - additionally, you're using a heavily outdated version of the Framework - I would recommend to update to the latest one. From the diff you're showing, there's no way to diagnose the problem - the best would be to include your serverless.yml file

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

5 participants