AWS Lambda action
AWS Lambda functions can be called when an automation stitch is triggered. This example uses a Security Rating Summary trigger in the automation stitch.
To configure an AWS Lambda function automation stitch in the GUI:
-
Go to Security Fabric > Automation, select the Stitch tab, and click Create New.
-
Enter the stitch name.
-
Configure the trigger:
-
Click Add Trigger.
-
Click Create and select Security Rating Summary.
-
Enter the following:
Name
auto-aws
Report
Security Posture
-
Click OK.
-
Select the trigger in the list and click Apply.
-
-
Configure the AWS Lambda function action:
-
Click Add Action.
-
Click Create and select AWS Lambda.
-
Enter the following:
Name
aws-action-1
URL
Enter the request API URI
API key
Enter the API key
HTTP header
header2 : header2_value
-
Click OK.
-
Select the action in the list and click Apply.
-
-
Click OK.
To configure an AWS Lambda function automation stitch in the CLI:
-
Create the automation trigger:
config system automation-trigger edit "auto-aws" set event-type security-rating-summary next end
-
Create the automation action:
config system automation-action edit "aws-action-1" set action-type aws-lambda set aws-api-key ************* set uri "0100000000.execute-api.us-east-2.amazonaws.com/default/xxxxx-autobatoon-XXX-lambdaXXX" config http-headers edit 1 set key "header2" set value "header2_value" next end next end
-
Create the automation stitch:
config system automation-stitch edit "auto-aws" set trigger "auto-aws" config actions edit 1 set action "aws-action-1" set required enable next end next end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In AWS, the log shows that the function was called, executed, and finished.