AWS Lambda action
AWS Lambda functions can be called when an automation stitch is triggered.
To configure an AWS Lambda function automation stitch in the GUI:
- Go to Security Fabric > Automation.
- Click Create New.
- Enter a name for the stitch, and select the FortiGate devices that it will be applied to.
- Select a trigger, such as Security Rating Summary.
- Select AWS Lambda Function and configure its settings.
Name
The action name.
Delay
The amount of time after the previous action before this action executes, in seconds (0 - 3600, default = 0).
API gateway
The API gateway URL, in the format:
{restapi-id}.execute-api.{region}.{domain}/{stage}/{path}
The CLI must be used to manually enter the individual parameters.
API key
The API key configured in your API gateway.
HTTP header
The HTTP request header name and value. Multiple headers can be added.
+
Click to add another action.
Actions can be reorganized as needed by dragging and dropping.
Name
The action name.
Delay
The amount of time after the previous action before this action executes, in seconds (0 - 3600, default = 0).
- Click OK.
To configure an AWS Lambda function automation stitch in the CLI:
- Create an automation action:
config system automation-action edit "aws-action-1" set action-type aws-lambda set aws-api-id "0100000000" set aws-region "us-east-2" set aws-api-stage "default" set aws-api-path "xxxxx-autobatoon-XXX-lambdaXXX" set aws-api-key ************* next end
- Create an automation trigger:
config system automation-trigger edit "auto-aws" set event-type security-rating-summary next end
- Create the automation stitch:
config system automation-stitch edit "auto-aws" set trigger "auto-aws" set action "aws-action-1" next end
When the automation stitch is triggered, the FortiGate shows the stitch trigger time:
In AWS, the log shows that the function was called, executed, and finished.