Need a hint ...Deploy Serverless Infrastructure

I’m stuck with an error in the Tutorial at Part II: Deploy your Serverless infrastructure

$ serverless deploy -v

Unlike the tutorial output, my output says:

Serverless: Using configuration:
{
  "webpackConfig": "./webpack.config.js",
  "includeModules": true,
  "packager": "npm",
  "packagerOptions": {},
  "packExternalModulesMaxBuffer": 204800
}
Serverless:
WARNING: Entry for resources@undefined could not be retrieved.
Please check your service config if you want to use lib.entries.
Serverless: Removing / .../my-app/.webpack
Serverless: Bundling with Webpack...
Time: 855ms

Built at: 2018-8-13 10:52:53
        Asset      Size  Chunks             Chunk Names
    delete.js   7.1 KiB       0  [emitted]  delete
    update.js  7.62 KiB       1  [emitted]  update
      list.js  7.38 KiB       2  [emitted]  list
       get.js  7.32 KiB       3  [emitted]  get
    create.js  7.21 KiB       4  [emitted]  create
delete.js.map  6.17 KiB       0  [emitted]  delete
update.js.map  6.96 KiB       1  [emitted]  update
  list.js.map  6.43 KiB       2  [emitted]  list
   get.js.map  6.46 KiB       3  [emitted]  get
create.js.map  6.33 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.38 KiB {0} [built]
   [8] ./update.js 2.9 KiB {1} [built]
   [9] ./list.js 2.66 KiB {2} [built]
  [10] ./get.js 2.59 KiB {3} [built]
  [11] external "uuid" 42 bytes {4} [built]
  [12] ./create.js 2.36 KiB {4} [built]
Serverless: Fetch dependency graph from /Users/ .../my-app/package.json
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 [4392 ms]
Serverless: Copy modules: /Users/   .../my-app/.webpack/service [1864 ms]
Serverless: Prune: /Users/  .../my-appserverless-stack/.webpack/service [2503 ms]
Serverless: Run scripts: /Users/    .../my-app/.webpack/service [0 ms]
Serverless: Zip service: /Users/    .../my-app/.webpack/service [1247 ms]
Serverless: Packaging service...
Serverless: Remove /Users/  .../my-app/.webpack

  Serverless Error ---------------------------------------

  Missing "handler" property in function "resources". Please make sure you point to the correct lambda handler. For example: handler.hello. Please check the docs for more info

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           8.11.3
     Serverless Version:     1.30.0

Thanks for any suggestions

1 Like

Resolved.

My mistake was five topics earlier when first changing the serverless.yml file to add the ‘resources’ section at the bottom. I carefully indented it to match the items above it, instead of outdenting it to create a new section.

1 Like

Ah thanks for reporting back. Glad you figure it out.

1 Like

Thank you for putting your solution.

I was passing by the exactly same mistake.

My terminal output was pretty much the same, and, as you did, I was concerned about the identation, because I had gone throw some errors with the serverless.yml file on the previous chapters, so, thinking about these errors, I decided to do just the same identation.

Thank you! As soon as I saw your solution and “de-idented”, everything worked fine!

1 Like

Glad you figured it out.

1 Like

Thanks a lot . I got the same error and your solution solved it

1 Like