Functions

get-function alias of ::aws::lambda::functions/get-function

fn (function_name: Str): GetFunctionResponse | ::aws::core/AwsError

Get details about a Lambda function, including code location.

Example

result ::aws::lambda::functions/get-function("my-function")
result.configuration.function_name  // => "my-function"
result.configuration.runtime        // => "nodejs20.x"
result.configuration.handler        // => "index.handler"

get-function-configuration alias of ::aws::lambda::functions/get-function-configuration

fn (function_name: Str): FunctionConfiguration | ::aws::core/AwsError

Get the configuration of a Lambda function (without code location).

Example

config ::aws::lambda::functions/get-function-configuration("my-function")
config.function_name  // => "my-function"
config.runtime        // => "nodejs20.x"
config.memory_size    // => 128
config.timeout        // => 3

invoke alias of ::aws::lambda::invoke/invoke

fn (function_name: Str, payload: Any, invocation_type: Str, log_type: Str): InvokeResponse | ::aws::core/AwsError
fn (function_name: Str, payload: Any, invocation_type: Str): InvokeResponse | ::aws::core/AwsError
fn (function_name: Str, payload: Any): InvokeResponse | ::aws::core/AwsError
fn (function_name: Str): InvokeResponse | ::aws::core/AwsError

Invoke a Lambda function synchronously.

Example

// Invoke with no payload
result ::aws::lambda::invoke/invoke("my-function")
result.status_code  // => 200
result.payload      // => "Hello from Lambda!"

// Invoke with payload
result ::aws::lambda::invoke/invoke("my-function", {name: "Hot", test: true})
result.status_code  // => 200
result.payload      // => {message: "Hello, Hot!"}

invoke-async alias of ::aws::lambda::invoke/invoke-async

fn (function_name: Str, payload: Any): InvokeResponse | ::aws::core/AwsError
fn (function_name: Str): InvokeResponse | ::aws::core/AwsError

Invoke a Lambda function asynchronously (fire and forget).

The function is invoked and returns immediately without waiting for the result. Returns status code 202 (Accepted) on success.

Example

result ::aws::lambda::invoke/invoke-async("my-function", {event: "process"})
result.status_code  // => 202

list-functions alias of ::aws::lambda::functions/list-functions

fn (max_items: Int, marker: Str): ListFunctionsResponse | ::aws::core/AwsError
fn (max_items: Int): ListFunctionsResponse | ::aws::core/AwsError
fn (): ListFunctionsResponse | ::aws::core/AwsError

List all Lambda functions in the account/region.

Example

result ::aws::lambda::functions/list-functions()
result.functions
// => [{function_name: "my-function", runtime: "nodejs20.x", ...}, ...]

// With limit
result ::aws::lambda::functions/list-functions(10)

Types

AwsError alias of ::aws::core/AwsError

Credentials alias of ::aws::core/Credentials

FunctionConfiguration alias of ::aws::lambda::functions/FunctionConfiguration

FunctionConfiguration type {
    function_name: Str?,
    function_arn: Str?,
    runtime: Str?,
    role: Str?,
    handler: Str?,
    code_size: Int?,
    description: Str?,
    timeout: Int?,
    memory_size: Int?,
    last_modified: Str?,
    code_sha256: Str?,
    version: Str?,
    vpc_config: Map?,
    environment: Map?,
    state: Str?,
    state_reason: Str?,
    state_reason_code: Str?,
    architectures: Vec?
}

GetFunctionResponse alias of ::aws::lambda::functions/GetFunctionResponse

GetFunctionResponse type {
    configuration: FunctionConfiguration?,
    code: Map?,
    tags: Map?
}

InvokeResponse alias of ::aws::lambda::invoke/InvokeResponse

InvokeResponse type {
    status_code: Int?,
    function_error: Str?,
    log_result: Str?,
    payload: Any,
    executed_version: Str?
}

ListFunctionsResponse alias of ::aws::lambda::functions/ListFunctionsResponse

ListFunctionsResponse type {
    functions: Vec,
    next_marker: Str?
}