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 services. It supports a wide range of bucket and object management features, including creating buckets, uploading/downloading objects, setting access controls, configuring bucket policies, lifecycle rules, logging, versioning, multipart uploads, and more.

The Put Bucket Logging operation specifically allows you to configure server access logging on an S3 bucket by specifying a target bucket and prefix where the logs will be stored. This is useful for auditing and monitoring access requests to your buckets.

Common scenarios:

  • Enabling detailed access logging on buckets to track requests for security or compliance.
  • Managing bucket configurations programmatically within workflows.
  • Automating complex S3 bucket setups including logging, lifecycle, and replication.

Practical example:
You want to enable logging on your production bucket my-app-bucket so that all access logs are saved in another bucket called my-logs-bucket under the prefix app-access-logs/. Using this node's Put Bucket Logging operation, you specify these parameters and automate enabling logging without manual AWS Console steps.


Properties

Name Meaning
Bucket Name The name of the S3 bucket on which to set the logging configuration.
Target Bucket The destination bucket where the access logs will be stored.
Target Prefix The prefix (folder path) inside the target bucket under which log files will be placed.

Output

The output JSON object for the Put Bucket Logging operation includes:

  • bucket: The name of the bucket on which logging was configured.
  • targetBucket: The target bucket specified for storing logs.
  • targetPrefix: The prefix used for log file placement.
  • message: Confirmation message indicating successful update of bucket logging.

Example output JSON:

{
  "bucket": "my-app-bucket",
  "targetBucket": "my-logs-bucket",
  "targetPrefix": "app-access-logs/",
  "message": "Bucket logging updated successfully",
  "operation": "putBucketLogging",
  "timestamp": "2024-06-01T12:00:00.000Z",
  "success": true
}

No binary data is output by this operation.


Dependencies

  • Requires an S3-compatible service endpoint with appropriate permissions to modify bucket logging settings.
  • Needs credentials providing access key ID, secret access key, and optionally session token.
  • The node uses AWS SDK v3 for JavaScript internally to communicate with the S3 API.
  • Ensure the n8n workflow has configured credentials with sufficient permissions to perform PutBucketLogging API calls.

Troubleshooting

  • Access Denied Errors:
    If you receive errors related to access denied, verify that the credentials have permission to call PutBucketLogging on the specified bucket and that the target bucket exists and is accessible.

  • Invalid Bucket Names:
    Ensure both the source bucket and target bucket names conform to S3 bucket naming rules.

  • Empty Target Bucket or Prefix:
    Providing empty values for target bucket or prefix may cause the logging configuration to be invalid or disabled unintentionally. Always specify a valid target bucket.

  • Network or Endpoint Issues:
    Connection failures might indicate incorrect endpoint URLs or network restrictions.

  • Error Messages:

    • "S3 operation failed: <error message>" indicates the underlying AWS SDK call failed; check the error message for details.
    • "Unknown operation: putBucketLogging" would mean the operation parameter is incorrect or unsupported (unlikely here as it is supported).

Links and References

Discussion