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 for secure temporary access, multipart uploads for large files, and detailed bucket and object management capabilities.

This node is beneficial in scenarios where you need to automate or integrate complex S3 workflows within n8n, such as:

  • Generating temporary URLs for clients to upload or download files without exposing credentials.
  • Managing bucket policies, ACLs, CORS, lifecycle rules, and tagging programmatically.
  • Handling large file uploads efficiently using multipart upload.
  • Querying object content using SQL expressions.
  • Copying objects between buckets or keys.
  • Restoring archived objects from Glacier.

Practical example: You can use this node to generate a presigned URL that allows a user to upload a file directly to your S3 bucket securely, without giving them direct access to your credentials. Another example is automating the cleanup of old objects by applying lifecycle rules or deleting objects based on tags.


Properties

Name Meaning
Bucket Name Name of the S3 bucket to operate on.
Object Key Complete path/key of the object within the bucket (e.g., folder/file.pdf).

For the Get Object ACL operation specifically, these two properties are required inputs.


Output

The output JSON structure for the Get Object ACL operation includes:

  • bucket: The name of the bucket queried.
  • key: The object key queried.
  • owner: Information about the owner of the object (usually an object containing ID and display name).
  • grants: An array of grants representing the Access Control List (ACL) entries for the object, detailing permissions granted to various users or groups.

Example output snippet:

{
  "bucket": "my-bucket-name",
  "key": "folder/file.pdf",
  "owner": {
    "ID": "owner-id",
    "DisplayName": "owner-display-name"
  },
  "grants": [
    {
      "Grantee": { /* grantee details */ },
      "Permission": "FULL_CONTROL"
    },
    {
      "Grantee": { /* grantee details */ },
      "Permission": "READ"
    }
  ],
  "operation": "getObjectAcl",
  "timestamp": "2024-06-01T12:00:00.000Z",
  "success": true
}

No binary data is output for this operation.


Dependencies

  • Requires an S3-compatible service endpoint with valid credentials (access key ID and secret access key, optionally session token).
  • Uses AWS SDK v3 for JavaScript internally to communicate with the S3 API.
  • Requires proper configuration of credentials in n8n for authentication.
  • No additional environment variables beyond standard credential setup are needed.

Troubleshooting

Common Issues

  • Invalid Credentials: If the access key or secret key is incorrect, connection tests will fail with errors indicating invalid keys or access denied.
  • Access Denied: Insufficient permissions on the S3 bucket or object may cause failures when retrieving ACLs.
  • Incorrect Bucket or Key: Specifying a non-existent bucket or object key will result in errors.
  • Network/Endpoint Issues: Misconfigured endpoint URLs or network connectivity problems can prevent successful API calls.

Error Messages and Resolutions

  • "S3 operation failed: <error message>" — General failure during the operation; check the detailed error message for specifics.
  • "Invalid Access Key ID. Please check your credentials." — Verify the access key ID used.
  • "Invalid Secret Access Key. Please check your credentials." — Verify the secret access key used.
  • "Access denied. Check your credentials and permissions." — Ensure the IAM user or role has permission to perform GetObjectAcl.
  • "Cannot connect to endpoint. Check your endpoint URL and network connection." — Validate the endpoint URL and network accessibility.

If the node is configured to continue on failure, errors will be returned in the output JSON with success: false.


Links and References


If you need summaries for other operations or resources, feel free to ask!

Discussion