You are browsing documentation for an outdated plugin version.
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:
-
name or plugin
string requiredThe 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
-
instance_name
stringAn 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)
-
service.name or service.id
stringThe 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
. -
route.name or route.id
stringThe 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
. -
consumer.name or consumer.id
stringThe 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
. -
enabled
boolean default:true
Whether this plugin will be applied.
-
config
record required-
timeout
number required default:60000
An optional timeout in milliseconds when invoking the function.
-
keepalive
number required default:60000
An optional value in milliseconds that defines how long an idle connection lives before being closed.
-
aws_key
string referenceable encryptedThe AWS key credential to be used when invoking the function.
-
aws_secret
string referenceable encryptedThe AWS secret credential to be used when invoking the function.
-
aws_assume_role_arn
string referenceable encryptedThe target AWS IAM role ARN used to invoke the Lambda function.
-
aws_role_session_name
string default:kong
The identifier of the assumed role session.
-
aws_sts_endpoint_url
stringA string representing a URL, such as https://example.com/path/to/resource?q=search.
-
aws_region
stringA string representing a host name, such as example.com.
-
function_name
stringThe AWS Lambda function name to invoke.
-
qualifier
stringThe qualifier to use when invoking the function.
-
invocation_type
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.
-
log_type
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.
-
host
stringA string representing a host name, such as example.com.
-
port
integer default:443
between:0
65535
An integer representing a port number between 0 and 65535, inclusive.
-
disable_https
boolean default:false
-
unhandled_status
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.
-
forward_request_method
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.
-
forward_request_uri
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.
-
forward_request_headers
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.
-
forward_request_body
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.
-
is_proxy_integration
boolean default:false
An optional value that defines whether the response format to receive from the Lambda to this format.
-
awsgateway_compatible
boolean default:false
An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.
-
proxy_url
stringA string representing a URL, such as https://example.com/path/to/resource?q=search.
-
skip_large_bodies
boolean default:true
An optional value that defines whether Kong should send large bodies that are buffered to disk
-
base64_encode_body
boolean default:true
An optional value that Base64-encodes the request body.
-
aws_imds_protocol_version
string required default:v1
Must be one of:v1
,v2
Identifier to select the IMDS protocol version to use:
v1
orv2
.
-