This sample Python script is AWS Lambda function to invoke SCORER Cloud API to create scheduled jobs. It is assumed that schleduled invocations are made by CloudWatch Events.
Python 3.7
{
"realm": "pub",
"device_id": "LT_....", # Device ID can be obtained from the SCORER Cloud URL
"api_key": "", # API can be obtained from SCORE Cloud settings menu
"algorithm_id": ""
}
Python requests module is not installed as default library in AWS Lambda, so you need to download this to local folder.
pip3 install requests -t .
Create new Lambda function with Python 3.7 runtime.
Compress this directory's contents as .zip and upload it.
Set Cloud Watch Events as trigger. For example, if you need to create a job every hour, it can be done by setting cron setting like cron(10 * * * ? *)
.