awsdocs / amazon-aurora-user-guide

The open source version of the Amazon Aurora User Guide. You can provide feedback by submitting issues in this repo, or propose changes by submitting a pull request.
Other
53 stars 101 forks source link

Lambda API returned error: Invalid Request Content. #8

Closed kaihendry closed 1 year ago

kaihendry commented 5 years ago

The stored procedure example on https://github.com/awsdocs/amazon-aurora-user-guide/blob/74b9910506e442963462d371dcb105f492a860fa/doc_source/AuroraMySQL.Integrating.Lambda.md has:


   CONCAT('{"email_to" : "', email_to, 
               '", "email_from" : "', email_from, 
               '", "email_subject" : "', subject, 
               '", "email_body" : "', body, '"}')

This will fail with a Invalid Request Content if there any quotes in body.

Solution I think is to use https://dev.mysql.com/doc/refman/5.7/en/json-creation-functions.html#function_json-quote

Thought I should mention this since we use your example and it is failing from time to time. =) https://github.com/unee-t/bz-database/issues/118

joshbean commented 1 year ago

Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.