Skip to main content
Feedback

Overview of Lambda Function Invocation Mode and Error Handling

The Lambda sidecar connector supports both Synchronous and Asynchronous Invocation modes. It also supports fail-safe and sure-fire policies.

Synchronous vs. Asynchronous Invocation

The Lambda Function Invocation Mode can be synchronous or asynchronous.

The integration allows the Lambda function implementor to choose between request/response and synchronous event invocation mode.

  • Request/Response Invocation: In this mode, the Cloud API Management Gateway uses the output of the Lambda function to modify content sent to the API provider or to the API consumer. This mode is applicable to security inspection, where the main purpose of the Lambda function is to terminate API call handling and return an error code to the user.

  • Synchronous Event Invocation: In this mode, the Lambda function indicates that it does not, by its design, yield any information that is usable by the Cloud API Management Gateway to modify the content sent to the API provider or to the API consumer. It is applicable for cases such as logging, analytics, quality control, anomaly alerting, etc.

Integration Error Handling

The integration error handling is defined for sure-fire and fail-safe policies.

The error handling policies are as follows:

  • Fail Safe Error Handling Policy: The AWS Lambda function implementor can indicate whether a fault of the function is critical for API traffic management.

  • Sure Fire Error Handling Policy: In case of a call failure to the Lambda function, the call processing also fails. The API client receives a 500 Internal Server Error with an opaque error message sent by the Cloud API Management gateway.

To learn more about Lambda sidecar connector business use cases and sample use case scenario, refer to Business Use Case and Inspiration and Sample Use Case Scenario Possible with Sidecar Connector.

On this Page