title: Local AWS lambda function (greengrass) does not execute
body: <p>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.</p>
  
  <p>I am trying to do this: 
  <a href="https://docs.aws.amazon.com/greengrass/latest/developerguide/lambda-functions.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/greengrass/latest/developerguide/lambda-functions.html</a></p>
  
  <p>with a little modification. In the AWS example, we can see some suscriptions</p>
  
  <p>Source       _   Target      _ _______    Topic filter</p>
  
  <p>IoT Cloud     <strong>_    This function  _</strong>      test/input_message</p>
  
  <p>This function <strong>_     IoT Cloud     _</strong>      test/topic_results</p>
  
  <p>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)</p>
  
  <p>In that way, the data would go on the greengrass device and directly in the lambda function, without going through the IoT Cloud.</p>
  
  <p>So I added the following subscriptions :</p>
  
  <p>Source       _   Target      _ _______    Topic filter</p>
  
  <p>myDevice      <strong>_    myLambdaFunction   _</strong>      iotgateway</p>
  
  <p>myLambdaFunction <strong>_      IoT Cloud     _</strong>      test/topic_results</p>
  
  <p>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..</p>
  
  <p>Do you have any idea about what would be missing ?</p>
  
  <p>Thanks for your help
  J</p>