Amazon Lambda Connector 1.0 Reference

Support Category: Select

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

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Response Timeout

Number

Timeout for requests to the remote service. This value is qualified by the Response Timeout Unit field.

1

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

MINUTES

Name

String

Identifier of this element, which is used to reference it in other components.

x

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

Connection Timeout

Number

Timeout for establishing connections to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

If false, each connection is closed after the first request is completed.

true

Max Connections

Number

Maximum number of outbound connections to keep open at the same time.

-1

Connection Idle Timeout

Number

Timeout for how long a connection can remain idle before it is closed.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Proxy Config

Reusable configuration element for outbound connections through a proxy.

Stream Response

Boolean

Whether or not to stream received responses.

false

Response Buffer Size

Number

Space in bytes for the buffer where the HTTP response will be stored.

-1

Access Key

String

The access key provided by Amazon.

x

Secret Key

String

The secret key provided by Amazon.

x

Role ARN

String

The ARN of the role to use.

Region

String

The region of the Amazon instance.

us-east-1

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

Protocol to use for communication. Valid values are HTTP and HTTPS.

HTTP

TLS Configuration

TLS

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.

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

String

The name of the configuration to use.

x

Function Name

String

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.

x

Body

Any

the content to use

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Custom Query Parameters

Object

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

Object

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

Number

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

  • DAYS

Time unit for the Response Timeout field.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

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

String

Name of the configuration to use.

x

Function Name

String

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.

x

Qualifier

String

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:

  • NONE

  • TAIL

Set to TAIL to include the execution log in the response.

X Amz Client Context

String

Up to 3583 bytes of Base64-encoded data about the invoking client to pass to the function in the context object.

Body

Any

Content to use.

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Custom Query Parameters

Object

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

Object

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

Number

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

  • DAYS

Time unit for the Response Timeout field.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

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

String

Name of the configuration to use.

x

Master Region

String

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:

  • ALL

Set to ALL to include entries for all published versions of each function.

Marker

String

Specify the pagination token that’s returned by a previous request to retrieve the next page of results.

Max Items

Number

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.

x

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Custom Query Parameters

Object

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.

#[null]

Custom Headers

Object

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

Number

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

  • DAYS

Time unit for the Response Timeout field.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

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

String

Name of the configuration to use.

x

Function Name

String

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.

x

Qualifier

String

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

x

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Custom Query Parameters

Object

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.

#[null]

Custom Headers

Object

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

Number

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

  • DAYS

Time unit for the Response Timeout field.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

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

Key

String

x

Value

String

x

Default Query Param

Field Type Description Default Value Required

Key

String

x

Value

String

x

Proxy

Field Type Description Default Value Required

Host

String

x

Port

Number

x

Username

String

Password

String

Non Proxy Hosts

String

TLS

Configures TLS to provide secure communications for your Mule app.

Field Type Description Default Value Required

Enabled Protocols

String

A comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

A comma-separated list of cipher suites enabled for this context.

Trust Store

Key Store

Revocation Check

Truststore

Field Type Description Default Value Required

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system, if possible.

Password

String

The password used to protect the truststore.

Type

String

The type of truststore used.

Algorithm

String

The algorithm used by the truststore.

Insecure

Boolean

If true, Mule stops performing certificate validations. This can make connections vulnerable to attacks.

Keystore

Field Type Description Default Value Required

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system, if possible.

Type

String

Type of keystore used.

Alias

String

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

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Algorithm used by the keystore.

Standard Revocation Check

Field Type Description Default Value Required

Only End Entities

Boolean

Only verify the last element of the certificate chain.

Prefer Crls

Boolean

Try CRL instead of OCSP first.

No Fallback

Boolean

Do not use the secondary checking method (the one not selected before).

Soft Fail

Boolean

Avoid verification failure when the revocation server can not be reached or is busy.

Custom OCSP Responder

Field Type Description Default Value Required

Url

String

The URL of the OCSP responder.

Cert Alias

String

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

Path

String

The path to the CRL file.

Reconnection

Field Type Description Default Value Required

Fails Deployment

Boolean

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

The reconnection strategy to use.

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

Blocking

Boolean

If false, the reconnection strategy will run in a separate, non-blocking thread.

Count

Number

How many reconnection attempts to make.

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

Blocking

Boolean

If false, the reconnection strategy will run in a separate, non-blocking thread.

Expiration Policy

Field Type Description Default Value Required

Max Idle Time

Number

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.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit that qualifies the Max Idle Time attribute.

HTTP Response Attributes

Field Type Description Default Value Required

Status Code

Number

x

Headers

Object

x

Reason Phrase

String

x

Repeatable In Memory Stream

Field Type Description Default Value Required

Initial Buffer Size

Number

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

Number

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

Number

Maximum size of the buffer. A value less than or equal to 0 means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which all these attributes are expressed

Repeatable File Store Stream

Field Type Description Default Value Required

In Memory Size

Number

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:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed