0

I am new to AWS IOT Greengrass & Lambda. I am working on a proof of concept that:

  • Send data from IOT device to gateway (running greengrass software).
  • process the data with Lambda function that is deployed on the gateway, which then forward the data thru Kinesis Firehose to S3 bucket.

I have already done the second part and deployed the long-lived Lambda function on the gateway. For my next step, due to the hardware available, I am required to send the data from the device to the gateway with HTTP post request.

My question is, what is the best way to invoke the deployed long-lived lambda function with the payload that I receive from the post request? Or am I approaching the problem incorrectly?

Many thanks

  • There are many ways to achieve this. I would suggest you look into API Gateway with AWS Lambda Proxy Integration. – raupach Aug 07 '20 at 11:18
  • @BjörnRaupach Thank you for your reply, I was attempting the suggestion but after the API gateway was setup and I have attempted to post a few requests, the logs were indicating with an error type: "errorType": "Runtime.ImportModuleError" with error message: "errorMessage": "Unable to import module 'messageLambda': No module named 'greengrass_common'". After a bit of researching, this error is caused by attempting to invoke a lambda function that is running in greengrass container. (Reference: https://github.com/aws/aws-greengrass-core-sdk-python/issues/3). Do you have any other suggestions? – waichunweijun Aug 11 '20 at 09:02

0 Answers0