# Error on deploy: "Missing or invalid 'path' property in function"

**URL:** <https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [July 26, 2017, 12:22am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365 "2017-07-26T00:22:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![john](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@john](https://forum.serverless.com/u/john)\
**Post date:** [July 26, 2017, 12:22am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365/1 "2017-07-26T00:22:44Z")

</div>

Hi, I’m trying, and failing, to say hello to the world. This is the only function I have in serverless.yml, which my yaml linter says is valid:

```
functions:
  hello:
    handler: handler.hello
    events:
      - http:
        path: hello
        method: get

```

There’s a matching handler in handler.js. When I run `serverless deploy` I get:

> Missing or invalid “path” property in function “hello” for http event in serverless.yml. If you define an http event, make sure you pass a valid value for it, either as string syntax, or object syntax. Please check the indentation of your config values if you use the object syntax. Please check the docs for more options.

If I remove the event it deploys fine. I’m running Node 7.2.1 and Serverless 1.18.0 (also tried 1.17.0) on OSX. Am I missing something obvious? It’s kind of embarrassing to get blocked on hello world :-/

---

<div class="post-metadata">

**Author:** ![yamazaki](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yamazaki](https://forum.serverless.com/u/yamazaki)\
**Post date:** [July 26, 2017, 12:34am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365/2 "2017-07-26T00:34:18Z")

</div>

I think that handler’s path wrong.  
Please check the directory structure of handler.hello once again.

---

<div class="post-metadata">

**Author:** ![bfieber](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bfieber/32/653_2.png) [@bfieber](https://forum.serverless.com/u/bfieber)\
**Post date:** [July 26, 2017, 12:37am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365/3 "2017-07-26T00:37:45Z")

</div>

You need to bump the path and method another tabstop.

```auto
functions:
  hello:
    handler: handler.hello
    events:
      - http:
          path: hello
          method: get

```

---

<div class="post-metadata">

**Author:** ![john](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@john](https://forum.serverless.com/u/john)\
**Post date:** [July 26, 2017, 1:08am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365/4 "2017-07-26T01:08:15Z")

</div>

Ah, didn’t realize yaml indentation changed in that circumstance–works now. Thank you very much for the quick reply, much appreciated!

---

<div class="post-metadata">

**Author:** ![mbashok](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/mbashok/32/4010_2.png) [@mbashok](https://forum.serverless.com/u/mbashok)\
**Post date:** [February 25, 2020, 7:48am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365/5 "2020-02-25T07:48:14Z")

</div>

Great Catch. I am too faced the same issue 🙂

---

<div class="post-metadata">

**Author:** ![NoreenThu](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@NoreenThu](https://forum.serverless.com/u/NoreenThu)\
**Post date:** [March 19, 2020, 7:30am UTC](https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365/6 "2020-03-19T07:30:22Z")

</div>

Thank you very much.
