AWS Lambda Jobs: Invoke Lambda
Automic Automation Invoke Lambda jobs allow you to trigger Lambda functions.
This page includes the following:
Defining AWS Lambda Invoke Lambda Job Properties
On the Invoke Lambda Job page, you define the parameters relevant to run that job on AWS Lambda from Automic Automation.
-
Connection
AWS Lambda Connection object containing the relevant information to connect to the application.
To search for a Connection object, start typing its name to limit the list of the objects that match your input.
-
Lambda Name
AWS Lambda function name to be invoked. The additional fields you need to define always depend on the Lambda function you define here.
You can click the browse button to the right of the field to open a picker dialog with all the names available and select the relevant one.
Note:By default, 200 entries are listed in the picker dialog, which means that if you have more entries in your Lambda instance, only 200 will be displayed. You cannot change this value as no filter option is available. For more information on Lambda ListFunctions, see https://docs.aws.amazon.com/lambda/latest/dg/API_ListFunctions.html
-
Payload
(Optional) The JSON that you want to provide to your Lambda function as input.
-
None (default)
No JSON will be provided.
-
File Path
Define the path to the JSON file containing the attributes that you want to pass to the application. Make sure that the file is available on the Agent machine (host).
-
JSON
Use the JSON field to enter the JSON payload definition.
-
-
Invocation Type
Defines the Lambda function to be invoked.
-
RequestResponse (default)
Invokes the function synchronously. Keeps the connection open until the function returns a response or times out. The API response includes the function response and additional data.Note:For functions with a long timeout, your client might disconnect during synchronous invocation while it waits for a response.
-
Tail Logs
(Optional) Check this box if you want to include the execution log in the response. The information is stored in the Report (REP).
Note:This box is disabled by default because including the log will prolong the time the job runs.
-
Client Context
(Optional) Defines the invoking client-specific information in the base sixty-four encoded format. Usually in JSON format, for example {"custom":{"foo":"hello"}}.
-
Qualifier
(Optional) Specifies a specific already published version or alias of the function this job will invoke.
-
-
DryRun
Validates parameter values and verifies that the user or role has permission to invoke the function.-
Qualifier
(Optional) Specifies a specific already published version or alias of the function this job will invoke.
-
-
Event
Invokes the function asynchronously. The event is sent and may fail multiple times to the function's dead-letter queue if one is configured. The API response only includes a status code.-
Qualifier
(Optional) Specifies a specific already published version or alias of the function this job will invoke.
-
-
The Pre-Process page allows you to define the settings of the Jobs using script statements. These statements are processed before the job is executed, see Setting Job Properties Through Scripts.
Example
The following example uses a JSON definition, which has the defined Lambda function coded so that it takes the name of a certain car and finds out whether it is safe or not.
The Agent log (PLOG) shows the parameters used to run the job, and in our specific case, that the car is safe:
Since we have activated the Tail Logs checkbox, the Report (REP) includes additional execution information such as the job's duration, the billed duration, the amount of time that will be added to the billing, the memory size and the maximum memory it used while running.
For a detailed description of how to create Lambda functions, see https://docs.aws.amazon.com/lambda/latest/dg/getting-started.html
See also: