AWS Lambda function and parameter reference
Following is the reference for the functions and parameters to use for invoking Lambda with Aurora PostgreSQL .
Functions and parameters
aws_lambda.invoke
Runs a Lambda function for an Aurora PostgreSQL DB cluster .
For more details about invoking Lambda functions, see also Invoke in the AWS Lambda Developer Guide.
Syntax
Input parameters
- function_name
-
The identifying name of the Lambda function. The value can be the function name, an ARN, or a partial ARN. For a listing of possible formats, see Lambda function name formats in the AWS Lambda Developer Guide.
- payload
-
The input for the Lambda function. The format can be JSON or JSONB. For more information, see JSON Types
in the PostgreSQL documentation. - region
-
(Optional) The Lambda Region for the function. By default, Aurora resolves the AWS Region from the full ARN in the
function_name
or it uses the Aurora PostgreSQL DB instance Region. If this Region value conflicts with the one provided in thefunction_name
ARN, an error is raised. - invocation_type
-
The invocation type of the Lambda function. The value is case-sensitive. Possible values include the following:
-
RequestResponse
– The default. This type of invocation for a Lambda function is synchronous and returns a response payload in the result. Use theRequestResponse
invocation type when your workflow depends on receiving the Lambda function result immediately. -
Event
– This type of invocation for a Lambda function is asynchronous and returns immediately without a returned payload. Use theEvent
invocation type when you don't need results of the Lambda function before your workflow moves on. -
DryRun
– This type of invocation tests access without running the Lambda function.
-
- log_type
-
The type of Lambda log to return in the
log_result
output parameter. The value is case-sensitive. Possible values include the following:-
Tail – The returned
log_result
output parameter will include the last 4 KB of the execution log. -
None – No Lambda log information is returned.
-
- context
-
Client context in JSON or JSONB format. Fields to use include than
custom
andenv
. - qualifier
-
A qualifier that identifies a Lambda function's version to be invoked. If this value conflicts with one provided in the
function_name
ARN, an error is raised.
Output parameters
- status_code
-
An HTTP status response code. For more information, see Lambda Invoke response elements in the AWS Lambda Developer Guide.
- payload
-
The information returned from the Lambda function that ran. The format is in JSON or JSONB.
- executed_version
-
The version of the Lambda function that ran.
- log_result
-
The execution log information returned if the
log_type
value isTail
when the Lambda function was invoked. The result contains the last 4 KB of the execution log encoded in Base64.
aws_commons.create_lambda_function_arn
Creates an aws_commons._lambda_function_arn_1
structure to hold
Lambda function name information. You can use the results of the
aws_commons.create_lambda_function_arn
function in the
function_name
parameter of the aws_lambda.invoke aws_lambda.invoke function.
Syntax
aws_commons.create_lambda_function_arn( function_name TEXT, region TEXT DEFAULT NULL ) RETURNS aws_commons._lambda_function_arn_1
Input parameters
- function_name
-
A required text string containing the Lambda function name. The value can be a function name, a partial ARN, or a full ARN.
- region
-
An optional text string containing the AWS Region that the Lambda function is in. For a listing of Region names and associated values, see Regions and Availability Zones.
aws_lambda parameters
In this table, you can find parameters associated with the aws_lambda
function.
Parameter | Description |
---|---|
| This is a dynamic parameter and it sets the maximum wait time while connecting to AWS Lambda.
The default values is |
| This is a dynamic parameter and it sets the maximum wait time while waiting for response from AWS Lambda.
The default values is |
| Specifies the endpoint that can be used to connect to AWS Lambda. An empty string selects the default AWS Lambda endpoint for the region. You must restart the database for this static parameter change to take effect. |