Click on 'Create Function' to create the Radware Bot Manager Lambda function.
Select 'Author From Scratch' and type a name for the function (recommended: "RadwareLambda"). Set RunTime to - Nodejs 10.x
Click on “Choose or create an execution role” and select “Create a new role from AWS policy templates”.
Give role name e.g. "myRole".
For policy templates select “Basic Lambda@Edge permission (for CloudFront Trigger)”.
Click on 'Create Function' and wait for the successful creation message.
Scroll down and go to the Function code section.
Select 'Upload a .ZIP file' under Code entry type and upload the shared ss2.zip kit using the "upload from a zip file" option.
Rename the Handler from 'index.handler' to "ss2.validateRequest".
Click on 'Save' at the top right corner and you will get the Radware lambda function uploaded successfully.
Scroll down and update the '_sid' value with your subscriber production ID in ss2.js file and 'Save' the file. Select 'Actions' and click on 'Publish new version' to publish Radware CloudFront integration.
Note: You can test the function before deploying it to CloudFront by selecting the test event 'Amazon CloudFront Simple Remote Call' in Select a test event dropdown.
Scroll down to the "Designer Add Trigger" section and select "CloudFront".
Select 'Distribution name' and scroll further to select 'Viewer Request' under the CloudFront event.
Check 'Enable trigger and replicate' and click on "Add".
Click on 'Save' to save your Radware lambda function. Note: Ensure you select 'Viewer Request' as Event type while editing the behavior of CloudFront.
Click on 'Create Function' to create another Lambda function and Follow steps 3 and 4.