Where is the documentation for the allowable Lambda Error Regex
values for the AWS API Gateway
? Are they Perl regexes? POSIX regexes? Something else?
Make sure that you also set up the corresponding error code ( 400 ) on the method response. Otherwise, API Gateway throws an invalid configuration error response at runtime. At runtime, API Gateway matches the Lambda error's errorMessage against the pattern of the regular expression on the selectionPattern property.
The Lambda Error RegExp will look for the string “NotFound” (with quotes) anywhere in the response if the Lambda function responded with fail. Our stringified error contains this string and will map to this Integration Response and API Gateway will respond with a 404 HTTP Status code.
To troubleshoot Lambda code errorsReview your Amazon CloudWatch Logs for Lambda. You can use CloudWatch to view all logs generated by your function's code and identify potential issues. For more information, see Accessing Amazon CloudWatch Logs for AWS Lambda.
Integration response regexes are currently limited to Java "Pattern" style regexes. See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With