0

I'm tryng to learn aws greengrass and stuck in creating lambda function which requires greengrass sdk env. for running helloworld code in python. As I have no device So I used one EC2 instance acting as an edge device.

While uploading the code in aws lambda getting this error ( "Lambda can't find the file greengrassHelloWorld.py. Make sure that your handler upholds the format: file-name.method.") and referring this document https://docs.aws.amazon.com/greengrass/latest/developerguide/create-lambda.html. Also, function is not visible in Edit Code Inline. Image showing uploaded function and handler as mentioned in the docs

2 Answers2

0

If you want to call your handler using "greengrassHelloWorld.function_handler", the greengrassHelloWorld.py should be at the root level inside the lambda zip file. Same for the greengrasssdk folder. You won't be able to test this lambda from the console directly as I assume the HelloWorld example is sending a message to GG Message Broker to show that then it is pushed to Iot Core Message Broker in the cloud.

CoxHawk
  • 41
  • 1
  • 3
0

Here is the fix:

Copy this value and use it as the Handler value (in your Lambda configuration):

Greengrass_HelloWorld.mylambda.greengrassHelloWorld.function_handler

Hope it helps!

Ram Grandhi
  • 901
  • 7
  • 9