# mulesoft Amazon Lambda Connector - Full Documentation --- product: Amazon Lambda Connector version: 1.0 --- # Amazon Lambda Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) enables you to execute AWS Lambda operations within your Mule flows. You can then use the response of the Lambda operation to process another Mule flow as needed. For compatibility information and fixed issues, see the Amazon Lambda Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The AWS Lambda API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - Creating a Mule app using Anypoint Studio or Anypoint Code Builder Before creating an app, you must have: - AWS Identity and Access Management (IAM) access key credentials - Access to the AWS Lambda target resource - Anypoint Studio version 7.3 or later ## Common Use Case for the Connector When your app manages large amounts of streaming data from various sources, Amazon Lambda Connector enables you to send the data stream to an AWS Lambda application that is specifically designed to quickly pull and process the required information. This enables you to manage necessary realtime tasks without slowing down your main application. ## Authentication Types AWS Lambda Connector supports AWS Lambda authentication. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.0 --- # Amazon Lambda Connector 1.0 - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/amazon-lambda http://www.mulesoft.org/schema/mule/amazon-lambda/current/mule-amazon-lambda.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-amazon-lambda-connector 1.0.0 mule-plugin ``` Replace the value for `` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `amazon lambda`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.0 --- # Amazon Lambda Connector 1.0 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt This example shows how to use the Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) to invoke a synchronous call and get results from AWS Lambda. ## Before You Begin Verify that Amazon Lambda Connector is added to your Mule project in Anypoint Studio. If it’s not, follow the instructions in [Add the Connector to Your Mule Project](https://docs.mulesoft.com/amazon-lambda-connector/1.0/amazon-lambda-connector-studio#add-connector-to-project). ## Synchronous Invocation Flow This example shows a simple AWS Lambda function call that is invoked using an HTTP listener. When the `http://localhost:8081/invoke` URL is called, the Lambda **Invoke** operation is performed, and the result is returned directly to you. ### Create the Configuration File 1. In Studio, go to the **Package Explorer** view and right-click the `/src/main/resources` folder in your project. 2. Select **New > File**. 3. Name the file `environment.properties`. 4. Edit the file to define the properties and values you need. ### Configure HTTP Listener Configure an HTTP Listener source to initiate the Amazon Lambda Connector **Invoke** operation flow each time it receives a request on the configured host (`localhost`) and port (`8081`): 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. Click **+** next to **Connector configuration** to configure a global element that can be used by all instances of the HTTP Listener source in the app. 4. In the **General** tab, specify connection information for the connector. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### Configure the Invoke Operation 1. In **Mule Palette**, select **Amazon Lambda Connector > Invoke**. 2. Drag **Invoke** to the Studio canvas to the right of the **Listener** source: ![Simple invoke example flow in Studio](/mulesoft/current/en-us/amazon-lambda-connector/1.0/_images/amazon-lambda-simple-invoke-example.png) 3. Configure the **Invoke** operation: ![Simple invoke operation General properties configuration](/mulesoft/current/en-us/amazon-lambda-connector/1.0/_images/amazon-lambda-simple-invoke-example-properties.png) In this example, the function name is supplied in the `environment.properties` file as `$config.functionName`. The payload from the HTTP Listener is passed directly into the body of the **Invoke** operation, which is specified as `REQUEST_RESPONSE`. This tells AWS Lambda that it does not need to store any logs for this operation and effectively makes this a synchronous call, which waits until the AWS Lambda function is finished processing before it returns its results. Alternatively, you can set **Invocation Type** to `EVENT`, which acts like an asynchronous call and returns an empty response immediately while AWS Lambda performs its action in the background. ### Create an AWS Lambda Function Depending on your Lambda function, when you run this flow, you might need to send in a request body. For example, you can create a Python 3.8 Lambda function like this: ```python def lambda_handler(event, context): message = 'Hello {} {}!'.format(event['first_name'], event['last_name']) return {'message' : message} ``` Consult the official AWS documentation if you don’t know how to create a new AWS Lambda function. This function takes the fields `first_name` and `last_name` from the input in JSON format and sends a greeting using the specified first and last names. Call the `http://localhost:8081/invoke` endpoint with a JSON body like this: ```json { "first_name": "", "last_name": "" } ``` The Mule flow responds with a Code 200 message: { "message": "Hello !" } ## XML for the Invoke Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). - [Amazon Lambda Connector Reference](https://docs.mulesoft.com/amazon-lambda-connector/1.0/amazon-lambda-connector-reference). - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.0 --- # Amazon Lambda Connector 1.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt > [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality. > We maintained certain terms to avoid any effect on customer implementations. Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) provides access to standard Amazon Lambda operations using Anypoint Platform. ## Configurations
NameTypeDescriptionDefault ValueRequired

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
NameTypeDescriptionDefault ValueRequired

Default Headers

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

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](#Create20141113FunctionsInvokeAsyncByFunctionName) - [Invoke](#Create20150331FunctionsInvocationsByFunctionName) - [List Functions](#Get20150331Functions) - [Get Function](#Get20150331FunctionsByFunctionName) ## Invoke Async `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Default Query Param
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Proxy
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Path

String

The path to the CRL file.

### Reconnection
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Status Code

Number

x

Headers

Object

x

Reason Phrase

String

x

### Repeatable In Memory Stream
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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

## See Also - [Amazon Lambda Connector Overview](https://docs.mulesoft.com/amazon-lambda-connector/1.0/) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.1 --- # Amazon Lambda Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) enables you to execute AWS Lambda operations within your Mule flows. You can then use the response of the Lambda operation to process another Mule flow as needed. For compatibility information and fixed issues, see the Amazon Lambda Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The AWS Lambda API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - Creating a Mule app using Anypoint Studio or Anypoint Code Builder Before creating an app, you must have: - AWS Identity and Access Management (IAM) access key credentials - Access to the AWS Lambda target resource - Anypoint Studio version 7.3 or later ## Common Use Case for the Connector When your app manages large amounts of streaming data from various sources, Amazon Lambda Connector enables you to send the data stream to an AWS Lambda application that is specifically designed to quickly pull and process the required information. This enables you to manage necessary realtime tasks without slowing down your main application. ## Authentication Types AWS Lambda Connector supports AWS Lambda authentication. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.1 --- # Amazon Lambda Connector 1.1 - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/amazon-lambda http://www.mulesoft.org/schema/mule/amazon-lambda/current/mule-amazon-lambda.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-amazon-lambda-connector 1.1.0 mule-plugin ``` Replace the value for `` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `amazon lambda`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.1 --- # Amazon Lambda Connector 1.1 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt This example shows how to use the Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) to invoke a synchronous call and get results from AWS Lambda. ## Before You Begin Verify that Amazon Lambda Connector is added to your Mule project in Anypoint Studio. If it’s not, follow the instructions in [Add the Connector to Your Mule Project](https://docs.mulesoft.com/amazon-lambda-connector/1.1/amazon-lambda-connector-studio#add-connector-to-project). ## Synchronous Invocation Flow This example shows a simple AWS Lambda function call that is invoked using an HTTP listener. When the `http://localhost:8081/invoke` URL is called, the Lambda **Invoke** operation is performed, and the result is returned directly to you. ### Create the Configuration File 1. In Studio, go to the **Package Explorer** view and right-click the `/src/main/resources` folder in your project. 2. Select **New > File**. 3. Name the file `environment.properties`. 4. Edit the file to define the properties and values you need. ### Configure HTTP Listener Configure an HTTP Listener source to initiate the Amazon Lambda Connector **Invoke** operation flow each time it receives a request on the configured host (`localhost`) and port (`8081`): 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. Click **+** next to **Connector configuration** to configure a global element that can be used by all instances of the HTTP Listener source in the app. 4. In the **General** tab, specify connection information for the connector. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### Configure the Invoke Operation 1. In **Mule Palette**, select **Amazon Lambda Connector > Invoke**. 2. Drag **Invoke** to the Studio canvas to the right of the **Listener** source: ![Simple invoke example flow in Studio](/mulesoft/current/en-us/amazon-lambda-connector/1.1/_images/amazon-lambda-simple-invoke-example.png) 3. Configure the **Invoke** operation: ![Simple invoke operation General properties configuration](/mulesoft/current/en-us/amazon-lambda-connector/1.1/_images/amazon-lambda-simple-invoke-example-properties.png) In this example, the function name is supplied in the `environment.properties` file as `$config.functionName`. The payload from the HTTP Listener is passed directly into the body of the **Invoke** operation, which is specified as `REQUEST_RESPONSE`. This tells AWS Lambda that it does not need to store any logs for this operation and effectively makes this a synchronous call, which waits until the AWS Lambda function is finished processing before it returns its results. Alternatively, you can set **Invocation Type** to `EVENT`, which acts like an asynchronous call and returns an empty response immediately while AWS Lambda performs its action in the background. ### Create an AWS Lambda Function Depending on your Lambda function, when you run this flow, you might need to send in a request body. For example, you can create a Python 3.8 Lambda function like this: ```python def lambda_handler(event, context): message = 'Hello {} {}!'.format(event['first_name'], event['last_name']) return {'message' : message} ``` Consult the official AWS documentation if you don’t know how to create a new AWS Lambda function. This function takes the fields `first_name` and `last_name` from the input in JSON format and sends a greeting using the specified first and last names. Call the `http://localhost:8081/invoke` endpoint with a JSON body like this: ```json { "first_name": "", "last_name": "" } ``` The Mule flow responds with a Code 200 message: { "message": "Hello !" } ## XML for the Invoke Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). - [Amazon Lambda Connector Reference](https://docs.mulesoft.com/amazon-lambda-connector/1.1/amazon-lambda-connector-reference). - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.1 --- # Amazon Lambda Connector 1.1 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) provides access to standard Amazon Lambda operations using Anypoint Platform. ## Configurations
NameTypeDescriptionDefault ValueRequired

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
NameTypeDescriptionDefault ValueRequired

Default Headers

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

Custom Service Endpoint

String

Sets a custom service endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint.

Custom STS Endpoint

String

Sets a custom STS endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint. The custom STS endpoint might not work if DefaultAWSCredentialsProviderChain is used. Instead, use AWS environment variables such as AWS_STS_REGIONAL_ENDPOINTS, AWS_REGION, and AWS_ENDPOINT_URL.

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

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

HTTP

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](#Create20141113FunctionsInvokeAsyncByFunctionName) - [Invoke](#Create20150331FunctionsInvocationsByFunctionName) - [List Functions](#Get20150331Functions) - [Get Function](#Get20150331FunctionsByFunctionName) ## Invoke Async `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Default Query Param
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Proxy
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Path

String

The path to the CRL file.

### Reconnection
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Status Code

Number

x

Headers

Object

x

Reason Phrase

String

x

### Repeatable In Memory Stream
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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

## See Also - [Amazon Lambda Connector Overview](https://docs.mulesoft.com/amazon-lambda-connector/1.1/) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.2 is-latest-version: true --- # Amazon Lambda Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) enables you to execute AWS Lambda operations within your Mule flows. You can then use the response of the Lambda operation to process another Mule flow as needed. For compatibility information and fixed issues, see the Amazon Lambda Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The AWS Lambda API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - Creating a Mule app using Anypoint Studio (Studio) Before creating an app, you must have: - AWS Identity and Access Management (IAM) access key credentials - Access to the AWS Lambda target resource - Anypoint Studio version 7.3 or later ## Common Use Case for the Connector When your app manages large amounts of streaming data from various sources, Amazon Lambda Connector enables you to send the data stream to an AWS Lambda application that is specifically designed to quickly pull and process the required information. This enables you to manage necessary realtime tasks without slowing down your main application. ## Authentication Types AWS Lambda Connector supports AWS Lambda authentication. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.2 is-latest-version: true --- # Amazon Lambda Connector 1.2 - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/amazon-lambda http://www.mulesoft.org/schema/mule/amazon-lambda/current/mule-amazon-lambda.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-amazon-lambda-connector 1.1.0 mule-plugin ``` Replace the value for `` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `amazon lambda`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.2 is-latest-version: true --- # Amazon Lambda Connector 1.2 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt This example shows how to use the Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) to invoke a synchronous call and get results from AWS Lambda. ## Before You Begin Verify that Amazon Lambda Connector is added to your Mule project in Anypoint Studio. If it’s not, follow the instructions in [Add the Connector to Your Mule Project](https://docs.mulesoft.com/amazon-lambda-connector/latest/amazon-lambda-connector-studio#add-connector-to-project). ## Synchronous Invocation Flow This example shows a simple AWS Lambda function call that is invoked using an HTTP listener. When the `http://localhost:8081/invoke` URL is called, the Lambda **Invoke** operation is performed, and the result is returned directly to you. ### Create the Configuration File 1. In Studio, go to the **Package Explorer** view and right-click the `/src/main/resources` folder in your project. 2. Select **New > File**. 3. Name the file `environment.properties`. 4. Edit the file to define the properties and values you need. ### Configure HTTP Listener Configure an HTTP Listener source to initiate the Amazon Lambda Connector **Invoke** operation flow each time it receives a request on the configured host (`localhost`) and port (`8081`): 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. Click **+** next to **Connector configuration** to configure a global element that can be used by all instances of the HTTP Listener source in the app. 4. In the **General** tab, specify connection information for the connector. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### Configure the Invoke Operation 1. In **Mule Palette**, select **Amazon Lambda Connector > Invoke**. 2. Drag **Invoke** to the Studio canvas to the right of the **Listener** source: ![Simple invoke example flow in Studio](/mulesoft/current/en-us/amazon-lambda-connector/latest/_images/amazon-lambda-simple-invoke-example.png) 3. Configure the **Invoke** operation: ![Simple invoke operation General properties configuration](/mulesoft/current/en-us/amazon-lambda-connector/latest/_images/amazon-lambda-simple-invoke-example-properties.png) In this example, the function name is supplied in the `environment.properties` file as `$config.functionName`. The payload from the HTTP Listener is passed directly into the body of the **Invoke** operation, which is specified as `REQUEST_RESPONSE`. This tells AWS Lambda that it does not need to store any logs for this operation and effectively makes this a synchronous call, which waits until the AWS Lambda function is finished processing before it returns its results. Alternatively, you can set **Invocation Type** to `EVENT`, which acts like an asynchronous call and returns an empty response immediately while AWS Lambda performs its action in the background. ### Create an AWS Lambda Function Depending on your Lambda function, when you run this flow, you might need to send in a request body. For example, you can create a Python 3.8 Lambda function like this: ```python def lambda_handler(event, context): message = 'Hello {} {}!'.format(event['first_name'], event['last_name']) return {'message' : message} ``` Consult the official AWS documentation if you don’t know how to create a new AWS Lambda function. This function takes the fields `first_name` and `last_name` from the input in JSON format and sends a greeting using the specified first and last names. Call the `http://localhost:8081/invoke` endpoint with a JSON body like this: ```json { "first_name": "", "last_name": "" } ``` The Mule flow responds with a Code 200 message: { "message": "Hello !" } ## XML for the Invoke Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). - [Amazon Lambda Connector Reference](https://docs.mulesoft.com/amazon-lambda-connector/latest/amazon-lambda-connector-reference). - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.2 is-latest-version: true --- # Amazon Lambda Connector 1.2 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) provides access to standard Amazon Lambda operations using Anypoint Platform. ## Configurations
NameTypeDescriptionDefault ValueRequired

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
NameTypeDescriptionDefault ValueRequired

Default Headers

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

Try Default AWSCredentials Provider Chain

Boolean

Set this field to true to obtain credentials from the AWS environment. See Using credentials providers in the AWS SDK for Java 2.x.

false

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.

External ID

String

A unique identifier used when assuming an IAM role in an external account. Provide the value specified by the administrator of the target account for added security.

Region

String

The region of the Amazon instance.

us-east-1

Custom Service Endpoint

String

Sets a custom service endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint.

Custom STS Endpoint

String

Sets a custom STS endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint. The custom STS endpoint might not work if DefaultAWSCredentialsProviderChain is used. Instead, use AWS environment variables such as AWS_STS_REGIONAL_ENDPOINTS, AWS_REGION, and AWS_ENDPOINT_URL.

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

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

HTTP

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](#Create20141113FunctionsInvokeAsyncByFunctionName) - [Invoke](#Create20150331FunctionsInvocationsByFunctionName) - [List Functions](#Get20150331Functions) - [Get Function](#Get20150331FunctionsByFunctionName) ## Invoke Async `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configurations](#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
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Default Query Param
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Proxy
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Path

String

The path to the CRL file.

### Reconnection
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Status Code

Number

x

Headers

Object

x

Reason Phrase

String

x

### Repeatable In Memory Stream
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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

## See Also - [Amazon Lambda Connector Overview](https://docs.mulesoft.com/amazon-lambda-connector/latest/) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.0 --- # Using Anypoint Studio to Configure Amazon Lambda Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Amazon Lambda Reference](https://docs.mulesoft.com/amazon-lambda-connector/1.0/amazon-lambda-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Amazon Lambda Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In the **Add Dependencies to Project** window, type `lambda` in the search field. 3. Click **Amazon Lambda Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Amazon Lambda Connector: - HTTP Listener Initiates a flow each time it receives a request on the configured host and port - Scheduler Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. In the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click **+** next to **Connector configuration** to configure a global element that can be used by all instances of the HTTP Listener source in the app. 6. In the **General** tab, specify connection information for the connector. 7. In the **TLS** tab, optionally specify the TLS information for the connector. 8. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Amazon Lambda Connector, follow these steps: 1. In **Mule Palette**, select **Amazon Lambda** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Amazon Lambda system. To configure the global element for Amazon Lambda Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. In the configuration screen for the operation, click **+** next to **Connector configuration** to access the global element configuration fields. 3. In the **General** tab, in **Connection**, select the authentication method to configure. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for Amazon Lambda Connector, configure the other required fields for the connector. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Amazon Lambda Connector Reference](https://docs.mulesoft.com/amazon-lambda-connector/1.0/amazon-lambda-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.1 --- # Using Anypoint Studio to Configure Amazon Lambda Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Amazon Lambda Reference](https://docs.mulesoft.com/amazon-lambda-connector/1.1/amazon-lambda-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Amazon Lambda Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In the **Add Dependencies to Project** window, type `lambda` in the search field. 3. Click **Amazon Lambda Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Amazon Lambda Connector: - HTTP Listener Initiates a flow each time it receives a request on the configured host and port - Scheduler Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. In the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click **+** next to **Connector configuration** to configure a global element that can be used by all instances of the HTTP Listener source in the app. 6. In the **General** tab, specify connection information for the connector. 7. In the **TLS** tab, optionally specify the TLS information for the connector. 8. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Amazon Lambda Connector, follow these steps: 1. In **Mule Palette**, select **Amazon Lambda** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Amazon Lambda system. To configure the global element for Amazon Lambda Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. In the configuration screen for the operation, click **+** next to **Connector configuration** to access the global element configuration fields. 3. In the **General** tab, in **Connection**, select the authentication method to configure. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for Amazon Lambda Connector, configure the other required fields for the connector. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Amazon Lambda Connector Reference](https://docs.mulesoft.com/amazon-lambda-connector/1.1/amazon-lambda-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Amazon Lambda Connector version: 1.2 is-latest-version: true --- # Using Anypoint Studio to Configure Amazon Lambda Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Amazon Lambda Reference](https://docs.mulesoft.com/amazon-lambda-connector/latest/amazon-lambda-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Amazon Lambda Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In the **Add Dependencies to Project** window, type `lambda` in the search field. 3. Click **Amazon Lambda Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Amazon Lambda Connector: - HTTP Listener Initiates a flow each time it receives a request on the configured host and port - Scheduler Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. In the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click **+** next to **Connector configuration** to configure a global element that can be used by all instances of the HTTP Listener source in the app. 6. In the **General** tab, specify connection information for the connector. 7. In the **TLS** tab, optionally specify the TLS information for the connector. 8. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Amazon Lambda Connector, follow these steps: 1. In **Mule Palette**, select **Amazon Lambda** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Amazon Lambda system. To configure the global element for Amazon Lambda Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. In the configuration screen for the operation, click **+** next to **Connector configuration** to access the global element configuration fields. 3. In the **General** tab, in **Connection**, select the authentication method to configure. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. In the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for Amazon Lambda Connector, configure the other required fields for the connector. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Amazon Lambda Connector Reference](https://docs.mulesoft.com/amazon-lambda-connector/latest/amazon-lambda-connector-reference) - [Salesforce Help](https://help.salesforce.com)