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 provides enhanced operations for interacting with S3-compatible object storage services. It supports a wide range of bucket and object management tasks, including generating presigned URLs for secure temporary access, uploading and downloading objects, copying objects between buckets, managing bucket policies, tags, lifecycle rules, versioning, multipart uploads, 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 securely without exposing credentials.
- Copying objects between buckets or within the same bucket programmatically.
- Managing bucket configurations like CORS, lifecycle, encryption, and logging.
- Handling large file uploads using multipart upload features.
- Querying object content using SQL expressions.
Example use case: Automatically copy a file from one bucket to another after processing it, or generate a presigned URL for a client to upload a file directly to your S3 bucket.
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). |
| Source Bucket | Source bucket name for copy operations. |
| Source Key | Source object key for copy operations. |
For the Copy Object operation specifically, the required properties are:
| Name | Meaning |
|---|---|
| Source Bucket | The bucket where the source object resides. |
| Source Key | The key/path of the source object to copy. |
| Bucket Name | The destination bucket name. |
| Object Key | The destination key/path for the copied object. |
Output
The output JSON structure for the Copy Object operation includes:
bucket: The destination bucket name.key: The destination object key.sourceBucket: The source bucket name.sourceKey: The source object key.etag: The ETag of the copied object (an identifier representing the object's content).copySourceVersionId(optional): Version ID of the source object if versioning is enabled.
Additionally, every output includes metadata fields:
operation: The operation performed (copyObject).timestamp: ISO timestamp when the operation was executed.success: Boolean indicating if the operation succeeded.
If an error occurs and "Continue On Fail" is enabled, the output will contain:
error: Error message string.success:false.operation: The attempted operation.timestamp: Timestamp of failure.
Dependencies
- Requires an S3-compatible service endpoint with valid credentials (access key ID and secret access key).
- Uses AWS SDK v3 for JavaScript internally to communicate with the S3 API.
- Requires configuration of credentials in n8n that provide access to the target S3-compatible storage.
- Optional: Custom endpoint and region can be configured for non-AWS S3-compatible services.
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 object may cause errors.
- Invalid Bucket or Key Names: Using incorrect bucket names or object keys will result in errors.
- Network/Endpoint Issues: Incorrect endpoint URLs or network connectivity problems can prevent communication with the S3 service.
- Malformed JSON Inputs: For operations requiring JSON input (not relevant for copy), invalid JSON will cause errors.
Common Error Messages
"S3 operation failed: <message>": General failure during the S3 operation; check the detailed message for specifics."Invalid Access Key ID. Please check your credentials.": The provided access key is not recognized."Invalid Secret Access Key. Please check your credentials.": The secret key does not match the access key."Access denied. Check your credentials and permissions.": Permissions issue on the bucket or object."Cannot connect to endpoint. Check your endpoint URL and network connection.": Network or endpoint misconfiguration.
Resolution Tips:
- Verify credentials and permissions.
- Confirm bucket and object keys exist and are correctly spelled.
- Check network connectivity and endpoint correctness.
- Enable "Continue On Fail" to handle errors gracefully in workflows.
Links and References
- AWS S3 CopyObject API Documentation
- AWS SDK for JavaScript v3 - S3 Client
- n8n Documentation - Creating Custom Nodes
- Presigned URLs in AWS S3 (related but for other operations)
Summary
This node's Copy Object operation allows copying an object from a source bucket/key to a destination bucket/key within an S3-compatible storage system. It requires specifying both source and destination details and returns metadata about the copied object, enabling automation of object duplication tasks in workflows.