title: Adding triggers to call Lambda function from Amazon Aurora is not working
body: <p>I am trying to add a trigger to a table on Amazon Aurora but when I run the following <code>CREATE TRIGGER</code> command nothing happens:</p>
  
  <pre><code>delimiter $$
  CREATE TRIGGER trigger_lambda_function_on_special_row_update 
    AFTER UPDATE ON example_table
  FOR EACH ROW
  BEGIN
      IF NEW.special_id = 12345 THEN
          CALL mysql.lambda_async("arn:aws:lambda:[region]:[account]:function:myfunction", CONCAT('{"param":"', NEW.id, '"}'));
      END IF;
  END;$$
  delimiter ;
  </code></pre>
  
  <p>By "nothing happens", I mean that when I run <code>CREATE TRIGGER</code> the database is still responsive — I can Ctrl+C to interrupt the query — but the query just sits there doing nothing until I finally get the response <code>MySQL has gone away</code>.</p>
  
  <p>Taking the <code>mysql.lambda_async</code> out of the trigger and running it is fine. I can see the invocation on AWS Lambda so I know this part is working.</p>
  
  <p>I did a bit of reading about triggers on Aurora and I can see some people mentioning the need to enable <code>log_bin_trust_function_creators</code> in the AWS Console "Parameter Groups" options if you want to use triggers, but this is only available for the mysql5.5+ parameter group family. If you want to invoke functions on Lambda, the option for this is only available in the aurora5.6 parameter family group. It would seem that you can't do both.</p>
  
  <p>HOWEVER! You must be able to do both; there are plenty of examples out there, even from Amazon themselves, where this seems entirely possible:</p>
  
  <p><a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Lambda.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Lambda.html</a> (See: <em>Example: Invoke an AWS Lambda Function to Publish an Event from a Trigger</em>)</p>
  
  <p>So I'm confused. Has anybody else made this process work?</p>