I’m following the installation documentation and when I run serverless deply I get an error Events for “hello” must be an array, not an object…
Can someone help me with this issue. I’m new to serverless and I’m trying to create the simple hello function to my aws lambda account. Thanks
rowanu
April 10, 2017, 1:20am
2
The events
property for your function definition needs to be a YAML array.
This is probably because the example code is for a different version of Serverless than you’re running.
buggy
April 10, 2017, 2:24am
3
If you need help debugging your serverless.yml file then it’s best to include the relevant sections in your post. So many of these problems come down to formatting.
You are right. I’m new to yaml as well and didn’t know that indentation was important.
The events property for your function definition needs to be a YAML array.
"- http" use a space between "-"and “http”. This may solve your problem.
3 Likes
Thanks @akhilesh … this worked for me.