{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/2442","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/2442/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/2442/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/2442/events","html_url":"https://github.com/serverless/serverless/issues/2442","id":183809627,"number":2442,"title":"Allow Absolute Paths with `invoke -p`","user":{"login":"erikerikson","id":571200,"avatar_url":"https://avatars.githubusercontent.com/u/571200?v=3","gravatar_id":"","url":"https://api.github.com/users/erikerikson","html_url":"https://github.com/erikerikson","followers_url":"https://api.github.com/users/erikerikson/followers","following_url":"https://api.github.com/users/erikerikson/following{/other_user}","gists_url":"https://api.github.com/users/erikerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/erikerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikerikson/subscriptions","organizations_url":"https://api.github.com/users/erikerikson/orgs","repos_url":"https://api.github.com/users/erikerikson/repos","events_url":"https://api.github.com/users/erikerikson/events{/privacy}","received_events_url":"https://api.github.com/users/erikerikson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-18T21:36:35Z","updated_at":"2016-10-18T22:13:03Z","closed_at":null,"body":"<!--\r\n1. If you have a question and not a bug/feature request please ask it at http://forum.serverless.com\r\n2. Please check if an issue already exists so there are no duplicates\r\n3. Check out and follow our Guidelines: https://github.com/serverless/serverless/blob/master/CONTRIBUTING.md\r\n4. Fill out the whole template so we have a good overview on the issue\r\n5. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue\r\n6. Please follow the template, otherwise we'll have to ask you to update it\r\n-->\r\n\r\n# This is a Bug Report\r\n\r\n## Description\r\n\r\nAs noted in the documentation, only relative paths are accepted by the invoke command.  If an absolute path is provided, the service path is prepended and the file thereby fails to be found.  This results in the error `'The file you provided does not exist.'`.\r\n\r\nFor bug reports:\r\n* What went wrong?\r\nProviding absolute path to a file that exists results in message `'The file you provided does not exist.'`.\r\n\r\n* What did you expect should have happened?\r\nThe file should be read and its contents sent to the function.\r\n\r\n* What was the config you used?\r\n`sls invoke -p /tmp/event.json`\r\n\r\n* What stacktrace or error message from your provider did you see?\r\nError comes from here: https://github.com/serverless/serverless/blob/master/lib/plugins/aws/invoke/index.js#L36\r\n\r\nSimilar or dependent issues:\r\n* None found\r\n\r\n## Additional Data\r\n\r\n* ***Serverless Framework Version you're using***:\r\nmaster as of time of creation\r\n\r\n* ***Operating System***:\r\nOSX\r\n\r\n* ***Stack Trace***:\r\nN/A\r\n\r\n* ***Provider Error messages***:\r\n`'The file you provided does not exist.'`"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/254654897","html_url":"https://github.com/serverless/serverless/issues/2442#issuecomment-254654897","issue_url":"https://api.github.com/repos/serverless/serverless/issues/2442","id":254654897,"user":{"login":"erikerikson","id":571200,"avatar_url":"https://avatars.githubusercontent.com/u/571200?v=3","gravatar_id":"","url":"https://api.github.com/users/erikerikson","html_url":"https://github.com/erikerikson","followers_url":"https://api.github.com/users/erikerikson/followers","following_url":"https://api.github.com/users/erikerikson/following{/other_user}","gists_url":"https://api.github.com/users/erikerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/erikerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikerikson/subscriptions","organizations_url":"https://api.github.com/users/erikerikson/orgs","repos_url":"https://api.github.com/users/erikerikson/repos","events_url":"https://api.github.com/users/erikerikson/events{/privacy}","received_events_url":"https://api.github.com/users/erikerikson/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T22:13:03Z","updated_at":"2016-10-18T22:13:03Z","body":"This came up in implementing [serverless-artillery](https://github.com/Nordstrom/serverless-artillery).\r\n\r\nUse case: the service directory may be an unaltered service template that lives in a global `node_modules` directory.  The user, running a command in an arbitrary directory wants to send an event based on a `json` or `yml` file to the service defined therein.  The location of that file is not relative to the service path."}}
{"actor":{"display_login":"erikerikson"}}