N8N Tools - S3 Enhanced icon

N8N Tools - S3 Enhanced

Enhanced S3 operations with presigned URLs, multipart upload, and advanced features

Overview

The node "N8N Tools - S3 Enhanced" provides a comprehensive set of operations to interact with S3-compatible object storage services. It supports advanced features such as generating presigned URLs and POSTs for secure temporary access, multipart uploads for large files, bucket and object management, ACL and tagging configurations, lifecycle policies, replication, encryption, website hosting settings, and more.

This node is beneficial in scenarios where users need to automate complex workflows involving S3 storage, such as:

  • Listing objects in a bucket with filtering capabilities.
  • Uploading or downloading files securely using presigned URLs.
  • Managing bucket policies, CORS, lifecycle rules, and versioning.
  • Handling multipart uploads for large files efficiently.
  • Querying object content using SQL expressions.

Practical example:
A user wants to list all PDF files starting with "book" in a specific bucket. They can use the "List Objects" operation with a search pattern book.*\.pdf to retrieve only matching objects. Another example is generating a presigned URL to allow temporary download access to an object without exposing credentials.


Properties

Name Meaning
Bucket Name Name of the S3 bucket to operate on.
Search Pattern Regular expression (case insensitive) to filter listed objects by their keys.

Note: The "Bucket Name" property is required and hidden when listing buckets (since no bucket is needed). The "Search Pattern" is shown only for the "List Objects" operation.


Output

For the List Objects operation, the output JSON structure includes:

  • bucket: The name of the bucket queried.
  • objects: An array of objects, each containing:
    • key: The object's key (path/name).
    • lastModified: Timestamp of last modification.
    • etag: Entity tag for the object.
    • size: Size of the object in bytes.
  • keyCount: Number of objects returned after filtering.

Example output snippet:

{
  "bucket": "my-bucket-name",
  "objects": [
    {
      "key": "book1.pdf",
      "lastModified": "2024-06-01T12:00:00Z",
      "etag": "\"etagvalue\"",
      "size": 12345
    },
    {
      "key": "book2.pdf",
      "lastModified": "2024-06-02T15:30:00Z",
      "etag": "\"etagvalue2\"",
      "size": 67890
    }
  ],
  "keyCount": 2
}

The node does not output binary data for this operation.


Dependencies

  • Requires an S3-compatible API key credential with access rights to the target bucket.
  • Uses AWS SDK v3 clients internally to communicate with the S3 service.
  • The node expects proper configuration of region, endpoint (optional), and authentication credentials.
  • No additional environment variables are explicitly required beyond the credentials.

Troubleshooting

Common Issues

  • Invalid credentials: If the access key or secret key is incorrect, connection tests and operations will fail.
  • Access denied: Insufficient permissions on the bucket or objects will cause errors.
  • Invalid bucket name: Using a non-existent or incorrectly spelled bucket name will result in errors.
  • Malformed search pattern: Invalid regular expressions may cause runtime errors or no results.
  • Network issues: Endpoint misconfiguration or network problems can prevent connection.

Error Messages and Resolutions

  • "S3 operation failed: <message>" — General failure during an S3 operation; check the detailed message for specifics.
  • "Invalid file data format" — When uploading, ensure file data is correctly base64 encoded or UTF-8 string.
  • "Invalid JSON format" — For properties expecting JSON input (not relevant for List Objects), ensure valid JSON syntax.
  • "Cannot connect to endpoint" — Verify endpoint URL and network connectivity.
  • "Access denied" — Confirm that the API key has sufficient permissions for the requested operation.

Links and References


If you need details about other operations or resources, feel free to ask!

Discussion