Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documentation for AWS API Gateway Lambda Error Regex?

Where is the documentation for the allowable Lambda Error Regex values for the AWS API Gateway? Are they Perl regexes? POSIX regexes? Something else?

enter image description here

like image 900
Rob Bednark Avatar asked Mar 17 '16 22:03

Rob Bednark


People also ask

How do you handle Lambda errors in API gateway?

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.

What is Lambda error regex?

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.

How do I find my AWS Lambda error?

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.


1 Answers

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

like image 188
RyanG Avatar answered Sep 28 '22 07:09

RyanG