AWS S3 Integration
Overview
The AWS S3 node connects Lamatic to Amazon S3, and works in two modes:
- Trigger mode: automatically detects file additions and modifications in a bucket and syncs them into a flow, most commonly for vectorization and indexing in Retrieval-Augmented Generation (RAG) flows. This is the original behavior of the node and is unchanged.
- Action mode: lets a flow directly upload, fetch, list, move, copy, or delete files, read file metadata, and create or delete folders, on demand, as one step in a larger flow.
To use the AWS S3 node in Trigger mode for RAG, you need to create a separate flow to implement RAG. You can integrate it into this distinct flow.
Features
âś… Key Functionalities
- Batch Trigger: Automates file fetching and synchronization on a schedule or in real-time using S3 event notifications.
- File Type Support: Handles text files, PDFs, Word Documents, and other compatible formats.
- Scheduled Processing: Supports automated sync schedules with configurable intervals for regular file updates.
- Selective Filtering: Use glob patterns to filter specific file types and paths for targeted file processing.
- Multiple Sync Modes: Supports both incremental (new/updated files only) and full-refresh (all files) synchronization modes.
- Scalable Processing: Scales efficiently with growing data volumes and large S3 buckets.
- File Actions: Upload, fetch, list, move, copy, delete, and read metadata for individual files on demand from within a flow.
- Folder Management: Create folders and delete folders (including everything inside them) directly from a flow.
- Configurable Signed URLs: Choose how long returned file URLs stay valid, from 15 minutes up to 7 days.
- S3-Compatible Providers: Works with any S3-compatible storage, not just AWS, including Supabase Storage, MinIO, and Cloudflare R2, by setting a custom endpoint.
âś… Benefits
- Streamlined File Collection: Automates the process of collecting files from Amazon S3 buckets, reducing manual effort and ensuring consistency.
- RAG Flow Preparation: Prepares files for vectorization and indexing to enhance Retrieval-Augmented Generation workflows.
- Scalable Architecture: Scales efficiently with growing data volumes and large S3 repositories.
- Flexible Configuration: Supports various file types and configurable processing strategies.
- Cost-Effective: Leverages AWS S3’s cost-effective storage for large-scale document management.
Prerequisites
Before setting up the AWS S3 node, ensure you have the following:
- An AWS account with appropriate bucket access permissions.
- The target S3 bucket name and configuration.
- An understanding of IAM policies and credentials.
If the connection fails, review IP Allowlisting and allow the required Lamatic and Cloudflare ranges.
Setup
Step 1: Set Up AWS Credentials
-
Create IAM Policy:
-
Navigate to the IAM console.
-
Create a new policy with required S3 permissions.
-
Use the provided JSON policy template.
⚠️The read-only policy below is enough for Trigger mode. If you’re using the node in Action mode, see Action mode permissions further down, Upload, Copy, and Create Folder need
s3:PutObject, and Delete File, Delete Folder, and Move needs3:DeleteObjecttoo.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket", "s3:ListAllMyBuckets" ], "Resource": "*" } ] }ℹ️Note: If you want to given permission only to specific buckets then add them to resource key, refer the below example
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::{your-bucket-name-1}/*", "arn:aws:s3:::{your-bucket-name-1}", "arn:aws:s3:::{your-bucket-name-2}/*", "arn:aws:s3:::{your-bucket-name-2}" ] } ] }đź’ˇNote: At this time, object-level permissions alone are not sufficient to successfully authenticate the connection. Please ensure you include the bucket-level permissions as provided in the example above.
If you want to restrict the usage to specific bucket then you can create the policy as follows:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ] }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource": "*" } ] }đź’ˇNote: You need to make sure that you are giving
ListAllMyBucketspermission with resource as*else you will not be able to see the available buckets in the node config.Action mode permissions
If you’re using the S3 node in Action mode, extend the policy with write and delete permissions. Upload File, Upload File from URL, Copy File, and Create Folder need
s3:PutObject. Delete File, Delete Folder, and Move File (which deletes the source after copying) needs3:DeleteObject.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket", "s3:ListAllMyBuckets" ], "Resource": "*" } ] }Moving or copying a file to a different bucket (via Destination Bucket) needs
s3:PutObjecton that destination bucket too, not just the source bucket. If you’re scoping permissions to specific buckets, include both in the policy’sResourcelist.
-
-
Configure IAM User:
-
Create or select an IAM user.
-
Attach the created policy.
-
Generate and securely store access credentials.
️⚠️Caution: Your Secret Access Key will only be visible once upon creation. Be sure to copy and store it securely.
For more information on managing your access keys, please refer to the official AWS documentation.
-
Step 2: Configure S3 Credentials
Use the following format to set up your credentials:
| Key Name | Description | Example Value |
|---|---|---|
| Credential Name | Name to identify this set of credentials | my-s3-creds |
| AWS Access Key | AWS access key ID for authentication | AKIAIOSFODNN7EXAMPLE |
| AWS Secret Key | AWS secret access key for authentication | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
| AWS Region | Required. The bucket’s AWS region, used to sign every request. | us-east-1 |
| Endpoint | Optional. Set this to use an S3-compatible provider instead of AWS, e.g. Supabase Storage, MinIO, or Cloudflare R2. Leave empty for AWS. | https://your-project.supabase.co/storage/v1/s3 |
The S3 node isn’t limited to AWS. Any S3-compatible storage provider (Supabase Storage, MinIO, Cloudflare R2, DigitalOcean Spaces, and others) works by setting the Endpoint field.
Step 3: Set Up Lamatic Flow
- Add the S3 node to your flow, either as a Trigger (for scheduled RAG sync) or as an Action (for on-demand file operations).
- Provide the credentials and bucket details.
- For a Trigger, configure sync settings, schedule, and file filters. For an Action, pick the operation you want from the Action dropdown and fill in its fields.
Trigger Configuration Reference
This applies when the S3 node is used as a Trigger for scheduled RAG sync. See Action Reference below for the on-demand file operations.
| Field | Description | Options/Examples | Requirement/Default |
|---|---|---|---|
| Credentials | Specifies the credentials required to access the S3 bucket. Ensure you have appropriate IAM credentials configured for the node. | Pre-configured S3 credentials (e.g., “S3”). | Mandatory |
| Bucket | Specifies the name of the Amazon S3 bucket that the node will interact with. | Example: new-testing-12345. | Mandatory |
| Parsing Strategy | Defines how files in the S3 bucket will be parsed. | Auto (automatic detection), other custom strategies. | Default: Auto |
| Globs (Path Patterns) | Allows specifying file path patterns to include or exclude files during processing. | Example: *.csv (include all CSV files). | Default: None (all files included). |
| Days to Sync If History Is Full | Defines how many days’ worth of historical data to sync when the history is full. | Example: 3. | Default: 3. |
| Start Date | Specifies the date from which the node should begin syncing files. | Format: YYYY-MM-DD. | Default: Empty (process all files). |
| Sync Mode | Determines how the synchronization is performed. | Incremental (new/updated files), other modes. | Default: Incremental. |
| Sync Schedule | Defines the frequency at which the synchronization process occurs. | Every 24 hours, custom intervals (e.g., hourly). | Default: Every 24 hours. |
Credentials
These are the authentication details used to connect to the S3 bucket. You must configure IAM credentials with appropriate permissions (e.g., read access to the bucket).
Bucket
The S3 bucket acts as the data source for this trigger. Enter the name of the bucket where your files are stored.
Parsing Strategy
This option determines how the files will be interpreted.
autolets the system decide the best way to parse files, while other strategies might require manual setup for specific file types.fastextracts text directly from the document which doesn’t work for all files.ocr_onlyis more reliable, but slower.
Globs (Path Patterns)
Use glob patterns to filter which files should be processed.
**: match everything.**/*.csv: match all files with a specific extension.myFolder/**/*.csv: match all.csvfiles anywhere undermyFolder.*/**: match everything at least one folder deep.*/*/*/**: match everything at least three folders deep.**/file.*|**/file: match every file called “file” with any extension (or no extension).x/*/y/*: match all files that sit in folderx -> any folder -> folder y.**/prefix*.csv: match all.csvfiles with a specific prefix.**/prefix*.parquet: match all.parquetfiles with a specific prefix.
This is helpful for excluding unnecessary files. See Glob Patterns for the full syntax reference.
Supported File Types
Only specific file types are currently supported for vectorization and indexing in Lamatic. Using unsupported formats may result in parsing errors during synchronization.
âś… Allowed File Extensions
.pdf— PDF Documents.txt— Plain Text Files.docx— Microsoft Word.pptx— Microsoft PowerPoint.md— Markdown Files
To avoid sync issues, ensure your glob patterns are configured to include only these types.
🔍 Recommended Glob Pattern
globs:
- "**/*.pdf"
- "**/*.txt"
- "**/*.docx"
- "**/*.pptx"
- "**/*.md"Days to Sync If History Is Full
If the system encounters a large backlog of files, this setting limits the synchronization to a defined number of recent days. It helps manage processing time and storage efficiently.
Start Date
Define a specific date from which the system should start processing files. This is particularly useful for incremental syncs where you only want to process data from a certain point in time.
Format: YYYY-MM-DDTHH:mm:ss.SSSSSSZ
Example: 2025-01-03T00:00:00.000000Z
Sync Mode
The S3 source connector supports the following:
-
In
Incrementalmode, the system only processes files that have been added or updated since the last sync. This reduces redundancy and improves performance. -
Full Refreshsync mode is a data replication method that copies all data from a source to a destination
Sync Schedule
This setting allows you to specify how often the synchronization process should run, such as every hour or every 24 hours. Regular intervals ensure that your data stays updated. You can Schedule the Sync on Every 3, 6, 8, 12 and 24 hours
Trigger Output
| Field | Type | Additional Info |
|---|---|---|
document_key | String | Document key (filename). |
content | String | Extracted text content from the file. |
document_url | String | Signed HTTPS URL for the processed file, valid for 5 hours. Use document_url to extract data if your file contains unstructured data. |
Example Output
{
"document_key": "example.pdf",
"content": "Extracted text content from the S3 file",
"document_url": "https://bucket-name.s3.us-east-1.amazonaws.com/example.pdf?X-Amz-Expires=18000&..."
}Action Reference
When used as an Action, the S3 node runs one of ten operations, picked from the Action dropdown. Each operation only shows the fields it needs.
Most actions accept a Signed URL Expiry field (900 = 15 minutes, 3600 = 1 hour, default, 21600 = 6 hours, 86400 = 24 hours, 604800 = 7 days, the maximum a signed S3 URL can allow). It controls how long the url returned in the action’s output stays valid.
Get File
Returns a signed URL for a single file, without downloading its contents into the flow.
| Field | Description | Required |
|---|---|---|
| File Path | Exact path to the file in the bucket, e.g. reports/quarterly-report.pdf | Yes |
| Signed URL Expiry | How long the returned URL stays valid | No, default 1 hour |
{
"key": "reports/quarterly-report.pdf",
"bucket": "my-bucket",
"url": "https://my-bucket.s3.us-east-1.amazonaws.com/reports/quarterly-report.pdf?..."
}List Files in Folder
| Field | Description | Required |
|---|---|---|
| Folder Path | Path to the folder, e.g. invoices/2024/. Leave empty for the bucket root. | No |
| File Pattern | Glob pattern to filter results, e.g. *.pdf. Leave empty to list everything. | No |
| Max Results | Number of files to return, from 1 to 1000 | No, default 100 |
| Signed URL Expiry | How long each file’s returned URL stays valid | No, default 1 hour |
Folder placeholder objects (see Keep Empty Folder below) are automatically excluded from results.
{
"bucket": "my-bucket",
"folder": "invoices/2024/",
"files": [
{ "key": "invoices/2024/jan.pdf", "size": 10432, "lastModified": "2025-01-04T10:00:00.000Z", "url": "https://..." }
],
"count": 1
}Upload File
Creates a new file from text content typed or mapped directly into the node.
| Field | Description | Required |
|---|---|---|
| File Path | Destination path, e.g. notes/summary. The correct extension is appended automatically if you leave it off. | Yes |
| File Type | Text (.txt), Markdown (.md), JSON (.json), CSV (.csv), or HTML (.html). Sets both the file extension and the S3 content type. | Yes, default Text |
| Content | The file contents to upload | Yes |
| Signed URL Expiry | How long the returned URL stays valid | No, default 1 hour |
If File Type is JSON, the content must be valid JSON, either a JSON string or an object mapped from a previous node. Invalid JSON is rejected before anything is uploaded.
{
"bucket": "my-bucket",
"key": "notes/summary.md",
"fileType": "markdown",
"etag": "d41d8cd98f00b204e9800998ecf8427e",
"size": 128,
"contentType": "text/markdown; charset=utf-8",
"url": "https://..."
}Upload File from URL
Downloads a file from a URL and stores it in the bucket as-is, keeping the source’s original content type.
| Field | Description | Required |
|---|---|---|
| File Path | Destination path in the bucket | Yes |
| File URL | URL to fetch, e.g. {{triggerNode.output.document_url}} | Yes |
| Signed URL Expiry | How long the returned URL stays valid | No, default 1 hour |
Since the URL is flow-controlled, it’s treated as untrusted input: only http/https are allowed, private and internal addresses (localhost, 10.x, 172.16-31.x, 192.168.x, link-local, and their IPv6 equivalents) are blocked, and up to 3 redirect hops are followed, each re-checked against the same rules before being fetched. Downloads are capped at 100 MB and time out after 120 seconds.
{
"bucket": "my-bucket",
"key": "imports/photo.jpg",
"etag": "d41d8cd98f00b204e9800998ecf8427e",
"size": 204800,
"contentType": "image/jpeg",
"url": "https://..."
}Move File / Copy File
Moving is a copy followed by deleting the source. Both actions share the same fields.
| Field | Description | Required |
|---|---|---|
| File Path | Source file path | Yes |
| Destination Path | New path for the file, e.g. archive/2024/report.pdf | Yes |
| Destination Bucket | Bucket to move/copy into. Leave empty to stay in the same bucket. | No |
| Keep Empty Folder | If this move empties the source folder, write a hidden .emptyFolderPlaceholder file so the folder stays visible (Move File only) | No, default true |
| Signed URL Expiry | How long the returned URL stays valid | No, default 1 hour |
The node checks the source file exists (and the destination bucket, if different) before copying, so a missing source or bucket returns a clear error instead of a generic failure. Moving/copying a file onto itself (same bucket, same path) is rejected up front.
{
"sourceBucket": "my-bucket",
"sourceKey": "reports/draft.pdf",
"bucket": "my-bucket",
"key": "archive/2024/draft.pdf",
"url": "https://...",
"moved": true
}Delete File
| Field | Description | Required |
|---|---|---|
| File Path | Path of the file to delete | Yes |
| Keep Empty Folder | If deleting this file empties its folder, write a hidden .emptyFolderPlaceholder file so the folder stays visible | No, default true |
S3 normally reports success even when you delete a key that never existed. This action checks first, so existed and deleted tell you whether there was actually a file there.
.emptyFolderPlaceholder is a zero-byte file, the same convention Supabase Storage uses to keep an otherwise-empty folder visible. It’s excluded from List Files results and hidden in Supabase’s own dashboard, but it will show up as a real object if you browse the bucket directly in the AWS console.
{
"bucket": "my-bucket",
"key": "reports/draft.pdf",
"existed": true,
"deleted": true
}Get File Metadata
Reads a file’s size, content type, and custom metadata without downloading it.
| Field | Description | Required |
|---|---|---|
| File Path | Path of the file | Yes |
| Signed URL Expiry | How long the returned URL stays valid | No, default 1 hour |
{
"bucket": "my-bucket",
"key": "reports/draft.pdf",
"exists": true,
"size": 10432,
"contentType": "application/pdf",
"lastModified": "2025-01-04T10:00:00.000Z",
"etag": "d41d8cd98f00b204e9800998ecf8427e",
"metadata": {},
"url": "https://..."
}If the file doesn’t exist, the action still succeeds and returns { "exists": false } rather than erroring.
Create Folder
S3 has no real folders, this writes a zero-byte marker object with a trailing slash, the same convention the AWS console uses.
| Field | Description | Required |
|---|---|---|
| Folder Path | Path of the folder to create, e.g. invoices/2025/ | Yes |
{
"bucket": "my-bucket",
"folder": "invoices/2025/",
"created": true
}Delete Folder
Deletes every file under the given path.
| Field | Description | Required |
|---|---|---|
| Folder Path | Path of the folder to delete, e.g. invoices/2023/. Deletes everything under this path. | Yes |
Each run deletes at most 10,000 objects. If the folder held more, truncated comes back true and you’ll need to run the action again to finish clearing it. The action refuses to run on an empty path or /, so it can’t be used to wipe an entire bucket by accident.
{
"bucket": "my-bucket",
"folder": "invoices/2023/",
"deletedCount": 842,
"truncated": false
}Low-Code Example
Trigger mode
triggerNode:
nodeId: triggerNode_1
nodeType: s3Node
nodeName: S3
values:
credentials: "AWS"
bucket: "TEST"
strategy: auto
globs:
- "**"
days_to_sync_if_history_is_full: "3"
start_date: "2025-01-03T00:00:00.000000Z"
syncMode: incremental_append
cronExpression: 0 0 00 1/1 * ? * UTCAction mode
- nodeId: s3Node_512
nodeType: s3Node
nodeName: S3
values:
credentials: "AWS"
bucket: "TEST"
action: S3_UPLOAD_FILE
filePath: "notes/{{triggerNode_1.output.title}}"
fileType: markdown
content: "{{triggerNode_1.output.body}}"
urlExpiry: "3600"
needs:
- triggerNode_1Troubleshooting
Common Issues
| Problem | Solution |
|---|---|
| Invalid Credentials | Verify IAM user credentials and policy permissions. |
| Bucket Not Found | Confirm bucket name and region configuration. |
| Sync Not Working | Check sync schedule settings and IAM permissions. |
| File Types Unsupported | Verify file formats are among supported types. |
| Permission Denied | Ensure IAM policy includes required S3 permissions. |
| Network Connectivity | Check network access and firewall settings. |
| Large File Issues | Verify file size limits and parsing strategy. |
| ”File URL points to a private or internal address” | Upload File from URL blocks localhost and private network ranges as a security measure. Point it at a publicly reachable URL instead. |
| ”File is too large to upload from URL” | Upload File from URL caps downloads at 100 MB. Split the file or upload it directly with Upload File instead. |
| ”Source file not found” on Move/Copy | Check the File Path is the exact source key. If a previous Move already ran, the file is already at its destination. |
| ”Source and destination point to the same file” | You set Destination Path (and bucket, if different) to the exact same location as File Path. Pick a different destination. |
| ”Too many redirects while downloading the file” | Upload File from URL follows at most 3 redirect hops. Use a direct URL instead of one behind a long redirect chain. |
| ”Content is not valid JSON” on Upload File | Ensure Content is a valid JSON string (or a mapped object) when File Type is set to JSON. |
truncated: true on Delete Folder | The folder had more than 10,000 objects. Run Delete Folder again to continue clearing it. |
Debugging
- Review AWS CloudWatch logs for access issues.
- Verify IAM policy permissions are correctly configured.
- Test bucket accessibility using AWS CLI or console.
- Check Lamatic Flow logs for detailed error information.
- If the connection fails, review IP Allowlisting and confirm the required Lamatic and Cloudflare ranges are allowed.
Best Practices
- Use
incrementalsync mode for better performance. - Implement specific glob patterns to avoid processing unnecessary files.
- Schedule syncs during off-peak hours to minimize impact.
- Use appropriate parsing strategies for different file types.
- Regularly monitor sync logs for any issues.
- Set appropriate
days_to_sync_if_history_is_fullto limit historical data. - Test with sample files before processing large buckets.
- Ensure proper IAM permissions with least privilege principle.
Example Use Cases
Document Intelligence Workflows
- Business Documents: Sync reports, contracts, and spreadsheets from S3 for automated processing.
- Data Archives: Index historical documents and data files stored in S3.
- Compliance Documents: Process audit trails and compliance-related content.
- Backup Files: Automate processing of backup documents and files.
RAG Applications
- Semantic Search: Enable natural language search across S3 documents.
- Question Answering: Build AI assistants that can answer questions about stored documents.
- Document Summarization: Automatically summarize lengthy reports and documents.
- Content Discovery: Help users find relevant information across S3 repositories.