Skip to content

aws.lambda-invoke action

Description

Invoke runs a Lambda function once and returns its result. Unlike a resource, an invocation has no desired state to reconcile and nothing to read back or destroy: it is a single Invoke call. The JSON payload is given inline through payload-content or read from a file through payload-path. invocation-type selects whether the call is synchronous (RequestResponse, the default), asynchronous (Event), or a permission-and-validation dry run (DryRun), and log-type Tail asks for the tail of the execution log alongside the response.

Source: internal/service/lambda/invoke_action.go:23

Example usage:

imports: {
  aws: 'github.com/cloudboss/unobin-library-aws'
}

actions: {
  example: aws.lambda-invoke {
    # Set input fields here.
  }
}

Inputs

function-name

string

required

payload-content

optional(string)

payload-path

optional(string)

qualifier

optional(string)

invocation-type

optional(string)

log-type

optional(string)

client-context

optional(string)

tenant-id

optional(string)

Input Constraints

Field combinations

Exactly one of payload-content or payload-path.

Invocation type rules

invocation-type must be RequestResponse, Event, or DryRun.

Rule logic
When
input.invocation-type != null
Require
input.invocation-type == 'RequestResponse'
|| input.invocation-type == 'Event'
|| input.invocation-type == 'DryRun'

Log type rules

log-type must be None or Tail.

Rule logic
When
input.log-type != null
Require
input.log-type == 'None'
|| input.log-type == 'Tail'

Outputs

status-code

integer

payload

string

executed-version

string

log-result

string