0

I am new in AWS, and I am using AWS IoT greengrass. I have some issues to invoke a Lambda function from the greengrass device.

I am trying to do this: https://docs.aws.amazon.com/greengrass/latest/developerguide/lambda-functions.html

with a little modification. In the AWS example, we can see some suscriptions

Source _ Target _ _______ Topic filter

IoT Cloud _ This function _ test/input_message

This function _ IoT Cloud _ test/topic_results

So the message is first sent from the IoT cloud to the local lambda function and then comes back to another topic. Instead of that, I send a sinusoidal signal (JSON) on a greengrass device called "myDevice" from a simulator. In the subscription I allowed myDevice -> iot Cloud on the topic "iotgateway", and I can see the data comming on the topic. What I would like to do now is to deploy a lambda function on my greengrass that publish the json on a topic (test/topic_results)

In that way, the data would go on the greengrass device and directly in the lambda function, without going through the IoT Cloud.

So I added the following subscriptions :

Source _ Target _ _______ Topic filter

myDevice _ myLambdaFunction _ iotgateway

myLambdaFunction _ IoT Cloud _ test/topic_results

but nothing append... when I add the subscription iot Cloud __ myLambdaFunction __ iotgateway, then it works and I can see the data on the topic, but it means the data goes from myDevice, then on the cloud, and finally in the lambda function. I don't understand why it doesn't work when I try to send the JSON directly on the lambda function in order to stay on the edge..

Do you have any idea about what would be missing ?

Thanks for your help J

sepp2k
  • 363,768
  • 54
  • 674
  • 675
jerry
  • 1
  • 1
  • It may be easier for you to follow this 1st. https://docs.aws.amazon.com/greengrass/latest/developerguide/quick-start.html – Ming Chan Mar 25 '20 at 02:32
  • Thanks, I folloed it to but the issue was a wrong client adress in kepware... I put my AWS Iot endpoint instead of my local ip adress.. It solved everything – jerry Apr 02 '20 at 14:44

0 Answers0