OpenRules Decision Manager allows business analysts to deploy their decision models as AWS Lambda decision services without any coding. They can do it even directly from their local installation by one click on the provided batch file “deployLambda.bat“!
What is actually required for AWS Lambda deployment? We assume that you already have an active AWS account and created your security credentials (access key ID and secret access key) which should not be shared with anybody. Then you should define your AWS deployment properties in the provided file “project.properties“. Here is an example of the required settings:
The property “aws.lambda.bucket” defines any new or existing S3 bucket name.
Then you simply click on the standard file “deployLambda.bat“. The decision model will be deployed and the console log will show the invoke URL for the deployed decision service (highlighted in the following example):
You may copy this URL and use it with POSTMAN or your own Java test-program as described in this tutorial.
But OpenRules goes even further! To simplify testing and to demonstrate how to invoke the deployed decision service, it generates the file “testLambda.bat” that already includes the above invoke URL. When you click on this file, it remotely executes all test cases defined in the Excel file “Test.xls” against just deployed AWS Lambda!
Additional AWS Properties
Optionally, you may use additional settings to specify more details about your AWS deployment preferences. For example, by default we use the word “test” (inside the invoke URL) as your deployment stage. But you may redefine it as “dev”, “prod”, or any similar word using this setting:
By default your deployed service will be publicly accessible, but it is possible to make it private.
Usually people keep their AWS Credentials (access key ID and secret access key) in the default file ~/.aws/credentials. However, alternatively you may define them directly in the file “project.properties”:
If you decide to undeploy your decision service and clean up your AWS, just click on the file “undeployLambda.bat“.
You can look at the sample project “VacationDays” as an example of how to deploy your own model as an AWS Lambda function. Copy files “project.properties”, “deployLambda.bat”, and “undeployLambda.bat” to your own project. After adjusting “project.properties” (if necessary) you may simply double-click on “deployLambda.bat”, and then use the generated “testLambda.bat” to test your own service.