Docs / Contact / connectors/aws-lambda
AWS Lambda
Provider:aws| Service:lambda| Direction: Read / Write
Amazon Lambda connector for invoking a serverless function. Invocation is synchronous (request/response): the function's response is captured into the flow step.
Required Permissions#
| Operation | Required IAM Permissions |
|---|---|
| Invoke | lambda:InvokeFunction |
Tip: Scope permissions to the specific function ARN to follow the principle of least privilege.
Operation#
When a message reaches this connector, it invokes the configured function. The payload may supply:
| Payload field | Required | Description |
|---|---|---|
functionName |
No | Function name or ARN to invoke. Overrides the connector's configured function. |
payload |
Yes | JSON string passed to the Lambda function as its event payload |
Connector Configuration#
The connector is created with type: "cloud", provider: "aws", service_type: "lambda", plus:
Field (config) |
Required | Description |
|---|---|---|
region |
No | AWS region code. Derived automatically if function_name is a full function ARN. |
access_key |
Yes | AWS access key. |
secret_key |
Yes | AWS secret key. |
function_name |
Yes | The Lambda function name or ARN to invoke. |
Output#
json
{
"status": "completed",
"statusCode": 200,
"data": {
"status": "invoked",
"statusCode": 200,
"method": "LAMBDA_INVOKE",
"endpoint": "process-device-event",
"duration": 120,
"response": { "result": "value" }
}
}
If the function returns a FunctionError, status is failed, statusCode is 500, and an error field is included. Access the function's parsed response in subsequent steps via payload.data.response.
Example#
Connector config (API key):
json
{
"type": "cloud",
"provider": "aws",
"service_type": "lambda",
"region": "us-east-1",
"access_key": "${secrets.aws_access_key}",
"secret_key": "${secrets.aws_secret_key}",
"function_name": "process-device-event"
}
Tendrl