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 operations for managing and interacting with S3-compatible object storage buckets and objects. It supports a wide range of bucket and object management tasks such as creating/deleting buckets, uploading/downloading objects, managing access control lists (ACLs), configuring bucket policies, lifecycle rules, CORS, versioning, replication, encryption, analytics, metrics, inventory, multipart uploads, and generating presigned URLs or posts.

The "Put Bucket Analytics" operation specifically allows users to set or update the analytics configuration of an S3 bucket by providing a JSON configuration. This is useful for enabling detailed analytics on bucket usage, which can help in monitoring access patterns, optimizing costs, or auditing.

Common scenarios where this node is beneficial:

  • Automating bucket configuration changes such as enabling analytics or metrics.
  • Managing large files via multipart upload.
  • Generating temporary presigned URLs for secure, time-limited access to objects without exposing credentials.
  • Managing bucket policies, ACLs, tags, and other advanced bucket features programmatically.
  • Querying object content using SQL expressions.
  • Integrating S3 bucket management into workflows without manual AWS console interaction.

Practical example for Put Bucket Analytics:

You want to enable analytics on your S3 bucket to track requests filtered by a prefix (e.g., only documents folder). You provide a configuration JSON specifying the analytics ID and filter prefix. The node updates the bucket's analytics configuration accordingly.


Properties

Name Meaning
Bucket Name Name of the S3 bucket to operate on.
Configuration ID Identifier for the analytics configuration to create or update.
Analytics Configuration JSON object defining the analytics settings, e.g., filters and parameters for analytics data.

The Analytics Configuration property expects a JSON structure similar to:

{
  "Id": "AnalyticsConfigurationId",
  "Filter": {
    "Prefix": "documents/"
  }
}

This JSON defines the analytics configuration details that will be applied to the bucket.


Output

The output JSON object for the "Put Bucket Analytics" operation includes:

  • bucket: The name of the bucket where the analytics configuration was applied.
  • configurationId: The ID of the analytics configuration.
  • analyticsConfiguration: The JSON object representing the applied analytics configuration.
  • message: A confirmation string indicating successful update, e.g., "Bucket analytics updated successfully".
  • operation: The operation name (putBucketAnalytics).
  • timestamp: ISO timestamp when the operation was performed.
  • success: Boolean indicating success (true).

Example output snippet:

{
  "bucket": "my-bucket-name",
  "configurationId": "AnalyticsConfig1",
  "analyticsConfiguration": {
    "Id": "AnalyticsConfig1",
    "Filter": {
      "Prefix": "documents/"
    }
  },
  "message": "Bucket analytics updated successfully",
  "operation": "putBucketAnalytics",
  "timestamp": "2024-06-01T12:00:00.000Z",
  "success": true
}

Dependencies

  • Requires an S3-compatible service endpoint with valid access credentials (access key ID and secret access key).
  • The node uses AWS SDK v3 clients internally to communicate with the S3 API.
  • Credentials must have permissions to perform bucket analytics configuration updates.
  • No additional environment variables are required beyond the configured credentials and optional endpoint URL.

Troubleshooting

  • Invalid JSON format error: If the provided analytics configuration JSON is malformed, the node throws an error indicating invalid JSON format. Ensure the JSON is correctly structured.
  • Access denied errors: Insufficient permissions on the credentials may cause access denied errors. Verify that the credentials have the necessary IAM permissions for PutBucketAnalyticsConfiguration.
  • Bucket not found: If the specified bucket does not exist or is inaccessible, the operation will fail. Confirm the bucket name is correct and accessible.
  • Network or endpoint issues: Connection failures may occur if the endpoint URL is incorrect or network connectivity is unavailable.
  • Operation unknown error: If an unsupported operation is selected, the node throws an error indicating unknown operation.

To resolve these issues, verify input parameters, credentials, and network connectivity.


Links and References

Discussion