0

I am currently trying to set up the basic HelloWorld example with AWS Greengrass on my Raspberry Pi. The installation stuff worked flawlessly, the daemon is running as it is supposed to. After that, I followed the instructions of "Getting Started with AWS GreenGrass" until this point

Here I ran into the following problem: I downloaded the python SDK for GreenGrass Core and unzipped it. After that, I created a new Lambda function and uploaded it and got the following error

I have no clue why that happens. I thought that it should be fine since the handler is not really called so whatever. I proceeded to finish the HelloWorld installation on GreenGrass but now I get no messages from the client despite successful deployments.

Can someone please help me to fix this mess?

Oluwafemi Sule
  • 36,144
  • 1
  • 56
  • 81
John Doe
  • 53
  • 6
  • What is the name of your py file? It looks wrong in the pop-up error message. It should be "greengrassHelloWorld.py" and then inside the file, there should be a function named as "function_handler(event, context)" – Ming Chan Jun 04 '18 at 01:05
  • The error was the fact that I wrote a dot at the end of the function name. They should stop putting dots in their inline code in the documentation.... – John Doe Jun 04 '18 at 06:02

1 Answers1

0

AWS has created AWS Greengrass under its IOT umbrella. The concept of Greengrass is quite interesting and useful. Even though the greengrass documentation is quite good, a normal user may face some problems.

Before starting greengrass, make sure you have good WIFI connection, and not ethernet or lan connection. Many of my problems were solved when I switched to WIFI rather than ethernet.

  1. For Lambda, the handler is very important. Make sure that you name it properly. If you are using the documentation program, then unzip the downloaded folder by right clicking on it, and not by command. You need to search for the three files required inside the folder, and then combine them with the code for zipping. Again try using the right clicking of the mouse for zipping, then the command line. The name of the handler should be the same as given in the documentation.

  2. When you test it, you will be getting the desired results, and you can change it by changing the event. The Lambda works fine when you test communicate device with the cloud .i.e. it will be giving the output on the console. If you are interacting multiple devices among one another, you need to create a trigger for the Lambda. This could be done on the Lambda creation page itself.

  3. You can make multiple Lambda functions as per you need. For an individual lambda function, you can make multiple version to. But make sure that you choose the correct version of the correct lambda function while setting up the subscription.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Raghav
  • 1