N8N Tools - S3 Enhanced icon

N8N Tools - S3 Enhanced

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

Overview

This node provides enhanced integration with S3-compatible storage services, enabling a wide range of bucket and object management operations. It supports advanced features such as generating presigned URLs for secure temporary access, multipart uploads for large files, lifecycle management, bucket policies, tagging, versioning, logging, notifications, replication, encryption, website hosting configurations, and more.

Typical use cases include:

  • Automating bucket lifecycle rules to manage object expiration or transition.
  • Generating presigned URLs to securely share objects without exposing credentials.
  • Managing bucket policies and permissions programmatically.
  • Handling large file uploads via multipart upload.
  • Configuring bucket analytics, metrics, and inventory.
  • Setting up bucket notifications and replication.

For example, the "Put Bucket Lifecycle" operation allows users to define lifecycle rules in JSON format to automate the expiration or transition of objects within a specified bucket.

Properties

Name Meaning
Bucket Name Name of the S3 bucket where the lifecycle rules will be applied.
Lifecycle Rules Lifecycle rules defined as a JSON array. These rules specify actions like expiration, transition, and filtering based on prefixes or tags. Example: [{"Status":"Enabled","Filter":{"Prefix":"logs/"},"Expiration":{"Days":30}}]

Output

The output is a JSON object containing at least the following fields:

  • bucket: The name of the bucket where the lifecycle configuration was set.
  • lifecycleRules: The parsed lifecycle rules JSON array that was applied.
  • message: A confirmation string indicating successful update of the bucket lifecycle configuration.
  • operation: The operation performed (e.g., "putBucketLifecycle").
  • timestamp: ISO 8601 timestamp of when the operation was executed.
  • success: Boolean indicating if the operation succeeded (true).

No binary data is output by this operation.

Example output JSON snippet:

{
  "bucket": "my-bucket-name",
  "lifecycleRules": [
    {
      "Status": "Enabled",
      "Filter": { "Prefix": "logs/" },
      "Expiration": { "Days": 30 }
    }
  ],
  "message": "Bucket lifecycle configuration updated successfully",
  "operation": "putBucketLifecycle",
  "timestamp": "2024-06-01T12:00:00.000Z",
  "success": true
}

Dependencies

  • Requires an S3-compatible storage service accessible via AWS SDK v3.
  • Requires valid API credentials (access key ID and secret access key) configured in n8n credentials.
  • Optional endpoint URL and session token can be provided for custom or compatible S3 services.
  • No additional environment variables are required beyond standard credential configuration.

Troubleshooting

  • Invalid lifecycle rules JSON format: If the lifecycle rules input is not valid JSON, the node throws an error indicating invalid JSON format. Ensure the lifecycle rules are correctly formatted JSON arrays.
  • Access Denied or Permission Errors: Insufficient permissions on the bucket may cause failures. Verify that the API credentials have permission to put lifecycle configurations on the target bucket.
  • Network or Endpoint Issues: Connection errors may occur if the endpoint URL is incorrect or unreachable. Confirm network connectivity and endpoint correctness.
  • Malformed Lifecycle Rules: Even if JSON is valid, lifecycle rules must conform to the expected structure defined by the S3 API. Invalid rule properties or values may cause errors from the service.

Links and References

Discussion