Amazon Lambda Connector 1.1 Reference | MuleSoft Documentation
# Amazon Lambda Connector 1.1 Reference
Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) provides access to standard Amazon Lambda operations using Anypoint Platform.
## Configurations
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
The name for this configuration. Connectors reference the configuration with this name.  
Connection |  Amazon Lambda Connection | The connection types to provide to this configuration.  
Response Timeout | Timeout for requests to the remote service. This value is qualified by the **Response Timeout Unit** field.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Identifier of this element, which is used to reference it in other components.  
Expiration Policy |  Expiration Policy | Minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.  
## Connection Types
### Amazon Lambda Connection
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Default Headers |  Array of Default Header  
Query Parameters |  Array of Default Query Param  
Connection Timeout | Timeout for establishing connections to the remote service.  
Connection Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Connection Timeout** field.  
Use Persistent Connections | If false, each connection is closed after the first request is completed.  
Max Connections | Maximum number of outbound connections to keep open at the same time.  
Connection Idle Timeout | Timeout for how long a connection can remain idle before it is closed.  
Connection Idle Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Connection Idle Timeout** field.  
Proxy Config | Reusable configuration element for outbound connections through a proxy.  
Stream Response | Whether or not to stream received responses.  
Response Buffer Size | Space in bytes for the buffer where the HTTP response will be stored.  
Access Key | The access key provided by Amazon.  
Secret Key | The secret key provided by Amazon.  
Role ARN | The ARN of the role to use.  
The region of the Amazon instance. | us-east-1  
Custom Service Endpoint | Sets a custom service endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint.  
Custom STS Endpoint | Sets a custom STS endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint.  
Protocol |  Enumeration, one of: | Protocol to use for communication. Valid values are HTTP and HTTPS.  
TLS Configuration  
Reconnection |  | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
## Operations
  *   *   * 

## Invoke Async
`<amazon-lambda:create20141113-functions-invoke-async-by-function-name>`
For asynchronous function invocation, use Invoke. Invokes a function asynchronously. This operation makes an HTTP POST request to the `/2014-11-13/functions/{FunctionName}/invoke-async/` endpoint.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | The name of the configuration to use.  
Function Name |  Name of the Lambda function. Name formats:
  * Function name: my-function.
  * Function ARN: arn:aws:lambda:us-west-2:123456789012:function:my-function.
  * Partial ARN: 123456789012:function:my-function.

The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
the content to use | #[payload]  
Config Ref |  ConfigurationProvider | The name of the configuration to use to execute this component.  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

| Configures how Mule processes streams. The default is to use repeatable streams.  
Custom Query Parameters | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.  
Custom Headers | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.  
Response Timeout | Timeout for requests to the remote service. This value is qualified by the **Response Timeout Unit**.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable**. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever

| A retry strategy in case of connectivity errors.  
### Output
Attributes Type |  HTTP Response Attributes  
---|---  
### For Configurations
  * 

### Throws
  * AMAZON-LAMBDA:BAD_REQUEST
  * AMAZON-LAMBDA:CLIENT_ERROR
  * AMAZON-LAMBDA:CONNECTIVITY
  * AMAZON-LAMBDA:INTERNAL_SERVER_ERROR
  * AMAZON-LAMBDA:NOT_ACCEPTABLE
  * AMAZON-LAMBDA:NOT_FOUND
  * AMAZON-LAMBDA:RETRY_EXHAUSTED
  * AMAZON-LAMBDA:SERVER_ERROR
  * AMAZON-LAMBDA:SERVICE_UNAVAILABLE
  * AMAZON-LAMBDA:TIMEOUT
  * AMAZON-LAMBDA:TOO_MANY_REQUESTS
  * AMAZON-LAMBDA:UNAUTHORIZED
  * AMAZON-LAMBDA:UNSUPPORTED_MEDIA_TYPE


## Invoke
`<amazon-lambda:create20150331-functions-invocations-by-function-name>`
Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously.
To invoke a function asynchronously, set `InvocationType` to `Event`.
For synchronous invocation, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the execution log and trace.
When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see Retry Behavior.
For asynchronous invocation, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function might receive the same event multiple times, even if no error occurs.
To retain events that were not processed, configure your function with a dead-letter queue. The status code in the API response doesn’t reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors, or issues with your function’s code and configuration. For example, Lambda returns `TooManyRequestsException` if executing the function causes you to exceed a concurrency limit at either the account level (`ConcurrentInvocationLimitExceeded`) or function level (`ReservedFunctionConcurrentInvocationLimitExceeded`).
For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.
This operation requires permission for the lambda:InvokeFunction action.
This operation makes an HTTP POST request to the `/2015-03-31/functions/{FunctionName}/invocations` endpoint.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Function Name |  Name of the Lambda function, version, or alias. Name formats:
  * Function name: my-function (name-only), my-function:v1 (with alias).
  * Function ARN: arn:aws:lambda:us-west-2:123456789012:function:my-function.
  * Partial ARN: 123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
Qualifier | Specify a version or alias to invoke a published version of the function.  
X Amz Invocation Type |  Enumeration, one of:
  * EVENT
  * REQUEST_RESPONSE
  * DRY_RUN
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
Qualifier | Specify a version or alias to invoke a published version of the function.  
X Amz Invocation Type |  Enumeration, one of:
  * EVENT
  * REQUEST_RESPONSE
  * DRY_RUN

|  Choose from the following options:
  * RequestResponse (default): Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.
  * Event: Invoke the function asynchronously. Send events that fail multiple times to the function’s dead-letter queue (if it’s configured). The API response only includes a status code.
  * DryRun: Validate parameter values and verify that the user or role has permission to invoke the function.

  
X Amz Log Type |  Enumeration, one of: | Set to `TAIL` to include the execution log in the response.  
X Amz Client Context | Up to 3583 bytes of Base64-encoded data about the invoking client to pass to the function in the context object.  
Content to use. | #[payload]  
Config Ref |  ConfigurationProvider | Name of the configuration to use to execute this component.  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

| Configures how Mule processes streams. The default is to use repeatable streams.  
Custom Query Parameters | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.  
Custom Headers | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.  
Response Timeout | Timeout for requests to the remote service. This value is qualified by the **Response Timeout Unit**.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable**. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever

| A retry strategy in case of connectivity errors.  
### Output
Attributes Type |  HTTP Response Attributes  
---|---  
### For Configurations
  * 

### Throws
  * AMAZON-LAMBDA:BAD_REQUEST
  * AMAZON-LAMBDA:CLIENT_ERROR
  * AMAZON-LAMBDA:CONNECTIVITY
  * AMAZON-LAMBDA:INTERNAL_SERVER_ERROR
  * AMAZON-LAMBDA:NOT_ACCEPTABLE
  * AMAZON-LAMBDA:NOT_FOUND
  * AMAZON-LAMBDA:RETRY_EXHAUSTED
  * AMAZON-LAMBDA:SERVER_ERROR
  * AMAZON-LAMBDA:SERVICE_UNAVAILABLE
  * AMAZON-LAMBDA:TIMEOUT
  * AMAZON-LAMBDA:TOO_MANY_REQUESTS
  * AMAZON-LAMBDA:UNAUTHORIZED
  * AMAZON-LAMBDA:UNSUPPORTED_MEDIA_TYPE


## List Functions
`<amazon-lambda:get20150331-functions>`
Returns a list of Lambda functions, with the version-specific configuration of each function. Lambda returns up to 50 functions per call. Set `FunctionVersion` to `ALL` to include all published versions of each function in addition to the unpublished version. The ListFunctions action returns a subset of the FunctionConfiguration fields.
To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.
This operation makes an HTTP GET request to the `/2015-03-31/functions` endpoint.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Master Region | For Lambda@Edge functions, the AWS Region of the master function. For example, us-east-1 filters the list of functions to include only Lambda@Edge functions replicated from a master function in US East (N. Virginia). If specified, you must set FunctionVersion to ALL.  
Function Version |  Enumeration, one of: | Set to ALL to include entries for all published versions of each function.  
Specify the pagination token that’s returned by a previous request to retrieve the next page of results.  
Max Items | The maximum number of functions to return in the response. Note that ListFunctions returns a maximum of 50 items in each response, even if you set the number higher.  
Config Ref |  ConfigurationProvider | Name of the configuration to use to execute this component.  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

| Configures how Mule processes streams. The default is to use repeatable streams.  
Custom Query Parameters | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.  
Custom Headers | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.  
Response Timeout | Timeout for requests to the remote service. This value is qualified by the **Response Timeout Unit**.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable**. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever

| A retry strategy in case of connectivity errors.  
### Output
Attributes Type |  HTTP Response Attributes  
---|---  
### For Configurations
  * 

### Throws
  * AMAZON-LAMBDA:BAD_REQUEST
  * AMAZON-LAMBDA:CLIENT_ERROR
  * AMAZON-LAMBDA:CONNECTIVITY
  * AMAZON-LAMBDA:INTERNAL_SERVER_ERROR
  * AMAZON-LAMBDA:NOT_ACCEPTABLE
  * AMAZON-LAMBDA:NOT_FOUND
  * AMAZON-LAMBDA:RETRY_EXHAUSTED
  * AMAZON-LAMBDA:SERVER_ERROR
  * AMAZON-LAMBDA:SERVICE_UNAVAILABLE
  * AMAZON-LAMBDA:TIMEOUT
  * AMAZON-LAMBDA:TOO_MANY_REQUESTS
  * AMAZON-LAMBDA:UNAUTHORIZED
  * AMAZON-LAMBDA:UNSUPPORTED_MEDIA_TYPE


## Get Function
`<amazon-lambda:get20150331-functions-by-function-name>`
Returns information about the function or function version, with a link to download the deployment package that’s valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.
This operation makes an HTTP GET request to the `/2015-03-31/functions/{FunctionName}` endpoint.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Function Name |  The name of the Lambda function, version, or alias. Name formats:
  * Function name: my-function (name-only), my-function:v1 (with alias).
  * Function ARN: arn:aws:lambda:us-west-2:123456789012:function:my-function.
  * Partial ARN: 123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
Qualifier | Specify a version or alias to get details about a published version of the function.  
Config Ref |  ConfigurationProvider | Name of the configuration to use to execute this component  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

| Configures how Mule processes streams. The default is to use repeatable streams.  
Custom Query Parameters | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.  
Custom Headers | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.  
Response Timeout | Timeout for requests to the remote service. This value is qualified by the **Response Timeout Unit**.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable**. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever
| Configures how Mule processes streams. The default is to use repeatable streams.  
Custom Query Parameters | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.  
Custom Headers | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.  
Response Timeout | Timeout for requests to the remote service. This value is qualified by the **Response Timeout Unit**.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable**. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever

| A retry strategy in case of connectivity errors.  
### Output
Attributes Type |  HTTP Response Attributes  
---|---  
### For Configurations
  * 

### Throws
  * AMAZON-LAMBDA:BAD_REQUEST
  * AMAZON-LAMBDA:CLIENT_ERROR
  * AMAZON-LAMBDA:CONNECTIVITY
  * AMAZON-LAMBDA:INTERNAL_SERVER_ERROR
  * AMAZON-LAMBDA:NOT_ACCEPTABLE
  * AMAZON-LAMBDA:NOT_FOUND
  * AMAZON-LAMBDA:RETRY_EXHAUSTED
  * AMAZON-LAMBDA:SERVER_ERROR
  * AMAZON-LAMBDA:SERVICE_UNAVAILABLE
  * AMAZON-LAMBDA:TIMEOUT
  * AMAZON-LAMBDA:TOO_MANY_REQUESTS
  * AMAZON-LAMBDA:UNAUTHORIZED
  * AMAZON-LAMBDA:UNSUPPORTED_MEDIA_TYPE


## Types
### Default Header
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
### Default Query Param
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
### Proxy
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Non Proxy Hosts**  
Configures TLS to provide secure communications for your Mule app.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Enabled Protocols** |  A comma-separated list of protocols enabled for this context.  
**Enabled Cipher Suites** |  A comma-separated list of cipher suites enabled for this context.  
**Trust Store**  
**Revocation Check** | 
  * Standard Revocation Check
  * Custom OCSP Responder

  
### Truststore
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Path to the truststore. Mule resolves the path relative to the current classpath and file system, if possible.  
The password used to protect the truststore.  
The type of truststore used.  
The algorithm used by the truststore.  
If `true`, Mule stops performing certificate validations. This can make connections vulnerable to attacks.  
### Keystore
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Path to the keystore. Mule resolves the path relative to the current classpath and file system, if possible.  
Type of keystore used.  
When the keystore contains many private keys, this attribute indicates the alias of the key to use. If not defined, the first key in the file is used by default.  
**Key Password** |  Password used to protect the private key.  
Password used to protect the keystore.  
Algorithm used by the keystore.  
### Standard Revocation Check
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Only End Entities** |  Only verify the last element of the certificate chain.  
**Prefer Crls** |  Try CRL instead of OCSP first.  
**No Fallback** |  Do not use the secondary checking method (the one not selected before).  
Avoid verification failure when the revocation server can not be reached or is busy.  
### Custom OCSP Responder
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
The URL of the OCSP responder.  
**Cert Alias** |  Alias of the signing certificate for the OCSP response (must be in the trust store), if present.  
### CRL File
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
The path to the CRL file.  
### Reconnection
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Fails Deployment** |  When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  The reconnection strategy to use.  
### Reconnect
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
How often in milliseconds to reconnect.  
If false, the reconnection strategy will run in a separate, non-blocking thread.  
How many reconnection attempts to make.  
### Reconnect Forever
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
How often in milliseconds to reconnect.  
If false, the reconnection strategy will run in a separate, non-blocking thread.  
### Expiration Policy
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Idle Time** |  A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.  
Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  Time unit that qualifies the **Max Idle Time** attribute.  
### HTTP Response Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Status Code**  
**Reason Phrase**  
### Repeatable In Memory Stream
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Initial Buffer Size** |  Initial amount of memory to allocate to the memory stream. If the stream data exceeds this value, the buffer expands by **Buffer Size Increment** , with an upper limit **Max In Memory Size value**.  
**Buffer Size Increment** |  Amount by which the buffer size expands if it exceeds its initial size. Setting a value of `0` or lower specifies that the buffer can’t expand. Mule raises a `STREAM_MAXIMUM_SIZE_EXCEEDED` error when the buffer gets full.  
**Max Buffer Size** |  Maximum size of the buffer. A value less than or equal to `0` means no limit.  
**Buffer Unit** |  Enumeration, one of: |  The unit in which all these attributes are expressed  
### Repeatable File Store Stream
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**In Memory Size** |  Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed content on the disk is buffered.  
**Buffer Unit** |  Enumeration, one of: |  The unit in which maxInMemorySize is expressed  
## See Also
  * Amazon Lambda Connector Overview
  * MuleSoft Help Center