N8N Tools - S3 Enhanced
Actions66
- Generate Presigned URL
- Generate Presigned POST
- Create Bucket
- Delete Bucket
- List Buckets
- Upload Object
- Download Object
- Delete Object
- List Objects
- Copy Object
- Get Object ACL
- Put Object ACL
- Get Bucket ACL
- Put Bucket ACL
- Get Bucket CORS
- Put Bucket CORS
- Delete Bucket CORS
- Get Bucket Lifecycle
- Put Bucket Lifecycle
- Delete Bucket Lifecycle
- Get Bucket Policy
- Put Bucket Policy
- Delete Bucket Policy
- Get Object Tagging
- Put Object Tagging
- Delete Object Tagging
- Get Bucket Tagging
- Put Bucket Tagging
- Delete Bucket Tagging
- Create Multipart Upload
- Upload Part
- Complete Multipart Upload
- Abort Multipart Upload
- List Parts
- List Multipart Uploads
- Get Bucket Versioning
- Put Bucket Versioning
- Get Bucket Logging
- Put Bucket Logging
- Get Bucket Notification
- Put Bucket Notification
- Get Bucket Replication
- Put Bucket Replication
- Delete Bucket Replication
- Get Bucket Encryption
- Put Bucket Encryption
- Delete Bucket Encryption
- Get Bucket Website
- Put Bucket Website
- Delete Bucket Website
- Get Bucket Metrics
- Put Bucket Metrics
- Delete Bucket Metrics
- Get Bucket Analytics
- Put Bucket Analytics
- Delete Bucket Analytics
- Get Bucket Inventory
- Put Bucket Inventory
- Delete Bucket Inventory
- Get Bucket Request Payment
- Put Bucket Request Payment
- Get Bucket Accelerate
- Put Bucket Accelerate
- Head Object
- Restore Object
- Select Object Content
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 including ACLs, tagging, lifecycle policies, and more.
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 configurations like CORS, lifecycle rules, versioning, and replication.
- Handling large file uploads efficiently using multipart upload.
- Setting or retrieving access control lists (ACLs) on buckets or objects.
- Tagging buckets and objects for organization and cost allocation.
- Querying object content using SQL expressions.
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 credentials. Another example is automating the setting of bucket lifecycle policies to archive or delete old data automatically.
Properties
| Name | Meaning |
|---|---|
| Bucket Name | Name of the S3 bucket to operate on. |
| Object Key | Complete path/key of the object inside the bucket (e.g., folder/file.pdf). |
| ACL | Access Control List permission to apply. Options: Private, Public Read, Public Read Write, Authenticated Read, AWS Exec Read, Bucket Owner Read, Bucket Owner Full Control. |
| HTTP Method | HTTP method for presigned URL generation. Options: GET (download), PUT (upload), HEAD (metadata). |
| Expires In (seconds) | Expiration time for presigned URLs or posts, in seconds (max 604800 = 7 days). |
| File Data | Data to upload for an object (binary or base64 encoded string). |
| Search Pattern | Regular expression pattern to filter listed objects (case insensitive). |
| Source Bucket | Source bucket name for copy operations. |
| Source Key | Source object key for copy operations. |
| CORS Rules | JSON array defining CORS configuration rules for a bucket. |
| Lifecycle Rules | JSON array defining lifecycle rules for a bucket. |
| Bucket Policy | JSON object defining the bucket policy. |
| Tags | JSON object with key-value pairs for tagging buckets or objects. |
| Upload ID | Multipart upload ID for managing multipart uploads. |
| Part Number | Part number for uploading a part in multipart upload (1-10000). |
| Part Data | Data for the part to upload (base64 encoded). |
| Parts | JSON array of parts with ETag and PartNumber for completing multipart upload. |
| Versioning Status | Versioning status for the bucket. Options: Enabled, Suspended. |
| MFA Delete | MFA delete status for the bucket. Options: Enabled, Disabled. |
| Target Bucket | Target bucket for logging configuration. |
| Target Prefix | Target prefix for log files in logging configuration. |
| Notification Configuration | JSON object defining notification settings for the bucket. |
| Replication Configuration | JSON object defining replication settings for the bucket. |
| Encryption Configuration | JSON object defining encryption settings for the bucket. |
| Website Configuration | JSON object defining website hosting settings for the bucket. |
| Configuration ID | Identifier used for metrics, analytics, or inventory configurations. |
| Metrics Configuration | JSON object defining metrics settings for the bucket. |
| Analytics Configuration | JSON object defining analytics settings for the bucket. |
| Inventory Configuration | JSON object defining inventory settings for the bucket. |
| Payer | Who pays for requests and data transfer. Options: Requester, BucketOwner. |
| Accelerate Status | Transfer acceleration status for the bucket. Options: Enabled, Suspended. |
| Restore Request | JSON object defining restore request parameters for archived objects. |
| Expression | SQL expression string for querying object content. |
| Expression Type | Type of expression used for querying. Currently only SQL supported. |
| Input Serialization | JSON object defining input serialization format for select queries. |
| Output Serialization | JSON object defining output serialization format for select queries. |
Output
The node outputs JSON objects containing the results of the selected operation. The structure varies depending on the operation but generally includes:
bucket: The bucket name involved in the operation.key: The object key if applicable.- Operation-specific fields such as:
- For Put Object ACL:
acl: The ACL value applied.message: Confirmation message indicating success.
- For other operations, relevant metadata or data such as presigned URLs, tags, lifecycle rules, etc.
- For Put Object ACL:
operation: The name of the executed operation.timestamp: ISO timestamp when the operation was performed.success: Boolean indicating if the operation succeeded.
If an error occurs and "Continue On Fail" is enabled, the output will contain an error message and success: false.
Binary data:
For operations involving file downloads or uploads, binary data is handled internally but exposed as base64-encoded strings in the JSON output (e.g., downloaded object data).
Dependencies
- Requires an S3-compatible service endpoint with valid credentials (access key ID and secret access key).
- Uses AWS SDK v3 libraries for S3 operations.
- Requires n8n credentials configured with appropriate API keys and permissions to perform the desired S3 actions.
- Optional endpoint and region configuration for custom or non-AWS S3-compatible services.
Troubleshooting
Common Issues
Invalid Credentials:
Errors related to invalid access key or secret key are common if credentials are misconfigured.
Resolution: Verify and re-enter the API key credential with correct values.Access Denied:
Insufficient permissions on the S3 bucket or object may cause access denied errors.
Resolution: Ensure the API key has proper IAM permissions for the requested operations.Invalid JSON Format:
When providing JSON inputs (e.g., lifecycle rules, tags, policies), invalid JSON syntax will cause errors.
Resolution: Validate JSON syntax before inputting into the node.Connection Issues:
Network problems or incorrect endpoint URLs can cause connection failures.
Resolution: Check network connectivity and verify the endpoint URL.
Error Messages
"S3 operation failed: <error message>"— General failure during an S3 operation; check the detailed error message for specifics."Invalid file data format"— Occurs if uploaded file data is not properly base64 or UTF-8 encoded."Invalid JSON format"— Happens when JSON input parameters cannot be parsed."Unsupported method: <method>"— Indicates an unsupported HTTP method was specified for presigned URL generation.
Links and References
- AWS S3 Documentation – Official documentation for Amazon S3.
- AWS SDK for JavaScript v3 – Reference for the SDK used by the node.
- S3 Access Control List (ACL) Overview
- Presigned URLs for Amazon S3
- Multipart Upload Overview
If you need details about other operations or resources, feel free to ask!