# AWS Lambda Configuration

The `aws-lambda` plugin invokes AWS Lambda function URLs and Amazon API Gateway endpoints with SigV4 signing, API key forwarding, and path preservation.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* function\_uri

  string

  required

  ***

  AWS Lambda function URL or Amazon API Gateway endpoint that triggers the Lambda function. In API7 Enterprise 3.9.20 and 3.10.7, and in APISIX 3.19.0, an endpoint with no path uses `/` as its request path.

* authorization

  object

  ***

  Credentials or API key added to requests sent to AWS. IAM credentials are used for SigV4 signing. An API Gateway API key identifies a caller for a usage plan and does not provide authentication or authorization.

  * apikey

    string

    ***

    API key added to the `X-API-Key` header for an Amazon API Gateway REST API. API Gateway uses the key to identify a caller for usage plans and quotas, not for authentication or authorization. API7 Gateway encrypts the value with AES at rest. APISIX encrypts it before etcd storage when `apisix.data_encryption.enable_encrypt_fields` is enabled.

  * iam

    object

    ***

    IAM access keys used to sign the request with [AWS Signature Version 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html). The plugin does not accept a session token.

    * accesskey

      string

      required

      ***

      IAM access key ID. API7 Gateway encrypts the value with AES at rest. APISIX encrypts it before etcd storage when `apisix.data_encryption.enable_encrypt_fields` is enabled.

    * secretkey

      string

      required

      ***

      IAM secret access key. API7 Gateway encrypts the value with AES at rest. APISIX encrypts it before etcd storage when `apisix.data_encryption.enable_encrypt_fields` is enabled.

    * aws\_region

      string

      default: `us-east-1`

      ***

      AWS region.

    * service

      string

      default: `execute-api`

      ***

      Service receiving the request.

      For an Amazon API Gateway endpoint, set the service to `execute-api`.

      For a Lambda function URL, set the service to `lambda`.

* timeout

  integer

  default: `3000`

  valid value:

  greater than or equal to 100

  ***

  Proxy request timeout in milliseconds.

* ssl\_verify

  boolean

  default: `true`

  ***

  If true, verify the upstream TLS certificate.

* keepalive

  boolean

  default: `true`

  ***

  If true, keep the connection alive for reuse.

* keepalive\_pool

  integer

  default: `5`

  valid value:

  greater than or equal to 1

  ***

  Maximum number of connections in the keepalive pool.

* keepalive\_timeout

  integer

  default: `60000`

  valid value:

  greater than or equal to 1000

  ***

  Time for connection to remain idle without closing in milliseconds.

* max\_req\_body\_size

  integer

  default: `67108864`

  valid value:

  greater than or equal to 1

  ***

  Maximum request body size in bytes buffered into memory before the request is sent to the configured AWS endpoint. A larger body is rejected with `400 Bad Request`. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.
