Overview
This node acts as an AWS Lambda Trigger that handles incoming AWS Lambda events via webhooks. It supports receiving data through HTTP POST requests, optionally authenticating the request using Basic Auth or Header Auth. The node can process multipart/form-data payloads, including file uploads, and can simplify the response data by returning only a selected part of the request (body, params, query, or headers). This node is useful for workflows that need to trigger actions based on AWS Lambda events or HTTP requests with flexible authentication and data handling options.
Use Case Examples
- Trigger a workflow when an AWS Lambda function sends an event with JSON data.
- Receive file uploads via multipart/form-data from an AWS Lambda event and process the files in the workflow.
- Authenticate incoming AWS Lambda events using Basic Auth or custom header authentication before processing.
Properties
| Name | Meaning |
|---|---|
| Authentication | The method used to authenticate incoming requests. Options include Basic Auth, Header Auth, or None. |
| Simplify Response | Whether to return a simplified version of the response data instead of the full raw data. |
| Simplify Data Key | Specifies which part of the data to return when simplification is enabled. Options include Body, Params, Query, or Headers. |
Output
Binary
Contains binary data extracted from multipart/form-data uploads, including file content and metadata.
JSON
headers- HTTP headers from the incoming request.params- URL parameters from the incoming request.query- Query string parameters from the incoming request.body- The body of the incoming request, which may contain JSON or form data.
Dependencies
- basic-auth (for Basic Authentication parsing)
- formidable (for parsing multipart/form-data)
- fs (for reading uploaded files)
Troubleshooting
- Authentication errors: If Basic Auth or Header Auth credentials are missing or incorrect, the node returns 401 or 403 errors. Ensure credentials are correctly configured in the node settings.
- Multipart form-data parsing issues: Large or malformed file uploads may cause parsing errors. Verify the incoming data format and size limits.
- Missing authentication data configuration: If authentication is enabled but credentials are not set, the node returns a 500 error. Configure credentials properly to avoid this.
Links
- AWS Lambda Documentation - Official AWS Lambda documentation for understanding Lambda events and triggers.
- Formidable NPM Package - Used for parsing multipart/form-data in Node.js.