N8N Tools - S3 Enhanced icon

N8N Tools - S3 Enhanced

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

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


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.

Discussion