LambdaConnector microservice invokes a function from the list of functions configured in Amazon Lambda service.
Configuration and Testing
Component Configuration
The figure below displays the Component Property Sheet (CPS) panel.
Figure 1: Component Configuration properties
Error handling configuration
The remedial actions to be taken when a particular error occurs can be configured using this attribute.
Click the ellipsis button against this property to configure Error Handling properties for different types of errors. By default, the options Log to error logs, Stop service and Send to error port are enabled.
Refer the Error Handling section in Common Configurations for detailed information.
AWS Connection Details
Click the AWS Connection Details ellipsis button to configure the properties.
Figure 2: AWS Connection properties
Access Key
Specify the Access Key id
Secret Key
Specify the Secret Key
Region
The region of AWS Management console.
Async Invoke?
Asynchronous invoke to a method returns immediately, giving control back to the calling thread without waiting for a response.Synchronous Invoke to a method blocks your thread's execution until the client receives a response from the service.Please note that the Call back is disabled for Async invoke.
Invocation Type
By default, the invoke API assumes RequestResponse invocation type. You can optionally request asynchronous execution by specifying Event as the invocation-type.Please note that the Call back is disabled for asynchronous invocation .This property is hidden for async invoke.
Is PayLoad Json Object?
Check the option,if the request-data to be sent is of type Json.The configuration of the object to be sent is represented in json string format.
Lamda Function Name
Name of the function to be invoked from the list of functions configured in Amazon Lambda service.
Qualifier Name
Use this optional parameter to specify any one of the following:
- Lambda function version: The API uses the qualified function ARN to invoke a specific Lambda function.
- Alias name: The API uses the alias ARN to invoke the Lambda function version to which the alias points.
Response charset
Charset to be used in decoding the response obtained from the configured lambda function.
Functional Demonstration
Invoke a function named pythonTest via LamdaConnector. Configure Lamda Connector as described in the Configuration and testing section above and use the Feeder and Display microservices to send sample input and check the response respectively.
Figure 3: Sample flow for demonstration
Output Message
Synchronous execution
Figure 4: Output Message in case of Synchronous execution
Asynchronous execution
Figure 5: Output Message in case of Asynchronous execution