Contents

LambdaConnector microservice invokes a function from the list of functions configured in Amazon Lambda service.

Get the Access Key ID and Secret Key from the AWS Management Console at https://console.aws.amazon.com/s3.

Icon

Provide AmazonS3FullAccess policy to the user to get the full access to the S3 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.

Icon

Versioning allows better management of in-production Lambda function code by enabling to publish one or more versions of the Lambda function. This subsequently helps in working with different variations of the function in the workflow (development/beta/production). Each Lambda function version has a unique Amazon Resource Name (ARN).

Icon

After publishing a version, the ARN cannot be changed.

AWS Lambda supports creating aliases for all Lambda function versions present. Conceptually, an AWS Lambda alias is a pointer to a specific Lambda function version, but it is also a resource similar to a Lambda function, and each alias has a unique ARN. Each alias maintains an ARN for a function version to which it points (an alias can only point to a function version, not to another alias). Unlike versions, which cannot be changed, aliases can be changed and can be updated to point to different versions. Aliases enable to abstract the process of promoting new Lambda function versions into production from the mapping of the Lambda function version and its event source.

Example

Icon
  • As new versions of the existing Lambda function are promoted into production, just update the PROD alias to point to the latest stable version in Amazon S3.
  • For ASync invokes, the function does not wait for the callback (result), rather just give the acknowledgement that the respective function is invoked asynchronously.

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

Input Message

Input message used in the Feeder microservice

Output Message

Synchronous execution


Figure 4: Output Message in case of Synchronous execution

Asynchronous execution


Figure 5: Output Message in case of Asynchronous execution

Adaptavist ThemeBuilder EngineAtlassian Confluence