Configuration
This plugin is compatible with DB-less mode.
Compatible protocols
The AWS Lambda plugin is compatible with the following protocols:
grpc
, grpcs
, http
, https
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
string required
The name of the plugin, in this case
aws-lambda
.- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
name
. - If using the KongPlugin object in Kubernetes, the field is
plugin
.
- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
-
string
An optional custom name to identify an instance of the plugin, for example
aws-lambda_my-service
.The instance name shows up in Kong Manager and in Konnect, so it's useful when running the same plugin in multiple contexts, for example, on multiple services. You can also use it to access a specific plugin instance via the Kong Admin API.
An instance name must be unique within the following context:
- Within a workspace for Kong Gateway Enterprise
- Within a control plane or control plane group for Konnect
- Globally for Kong Gateway (OSS)
-
string
The name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/{serviceName|Id}/plugins
. -
string
The name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/{routeName|Id}/plugins
. -
string
The name or ID of the consumer the plugin targets. Set one of these parameters if adding the plugin to a consumer through the top-level
/plugins
endpoint. Not required if using/consumers/{consumerName|Id}/plugins
. -
boolean default:
true
Whether this plugin will be applied.
-
record required
-
number required default:
60000
An optional timeout in milliseconds when invoking the function.
-
number required default:
60000
An optional value in milliseconds that defines how long an idle connection lives before being closed.
-
string referenceable encrypted
The AWS key credential to be used when invoking the function.
-
string referenceable encrypted
The AWS secret credential to be used when invoking the function.
-
string referenceable encrypted
The target AWS IAM role ARN used to invoke the Lambda function.
-
string default:
kong
The identifier of the assumed role session.
-
string
A string representing a URL, such as https://example.com/path/to/resource?q=search.
-
string
A string representing a host name, such as example.com.
-
string
The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.
-
string
The qualifier to use when invoking the function.
-
string required default:
RequestResponse
Must be one of:RequestResponse
,Event
,DryRun
The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.
-
string required default:
Tail
Must be one of:Tail
,None
The LogType to use when invoking the function. By default, None and Tail are supported.
-
string
A string representing a host name, such as example.com.
-
integer default:
443
between:0
65535
An integer representing a port number between 0 and 65535, inclusive.
-
boolean default:
false
-
integer between:
100
999
The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.
-
boolean default:
false
An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.
-
boolean default:
false
An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.
-
boolean default:
false
An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.
-
boolean default:
false
An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request.
-
boolean default:
false
An optional value that defines whether the response format to receive from the Lambda to this format.
-
boolean default:
false
An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.
-
string
A string representing a URL, such as https://example.com/path/to/resource?q=search.
-
boolean default:
true
An optional value that defines whether Kong should send large bodies that are buffered to disk
-
boolean default:
true
An optional value that Base64-encodes the request body.
-
string required default:
v1
Must be one of:v1
,v2
Identifier to select the IMDS protocol version to use:
v1
orv2
.
-
string required default:
legacy
Must be one of:legacy
,correct
An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as
[]
arrays or{}
objects in JSON responses. The valuelegacy
means Kong will send empty arrays as{}
objects in response
-