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. Specifically for the Generate Presigned POST operation, it creates a presigned POST URL and form fields that allow secure, temporary, browser-based uploads directly to an S3 bucket without exposing credentials.

Use cases:

  • Allowing users or clients to upload files directly to an S3 bucket via HTML forms securely.
  • Enabling web applications to provide temporary upload access without backend proxying.
  • Automating workflows where files need to be uploaded to S3 by external systems or users with limited permissions.

Example:
You want to let users upload profile pictures directly to your S3 bucket from a web page. Using this node's Generate Presigned POST operation, you generate a URL and form fields that your frontend can use to submit the file securely and temporarily.


Properties

Name Meaning
Bucket Name Name of the S3 bucket where the object will be uploaded.
Object Key Complete path/key of the object in the bucket (e.g., folder/file.pdf).
Expires In (seconds) Duration in seconds for which the presigned POST is valid (maximum 604800 seconds = 7 days).

Output

The output JSON contains the following fields:

  • bucket: The name of the S3 bucket.
  • key: The object key/path within the bucket.
  • url: The presigned POST URL to which the form data should be submitted.
  • fields: An object containing form fields (such as policy, signature, etc.) required for the POST request.
  • expiresIn: The expiration time in seconds for the presigned POST.
  • expiresAt: ISO timestamp indicating when the presigned POST expires.

This output enables constructing an HTML form or HTTP POST request to upload files directly to the specified S3 bucket with the given key.


Dependencies

  • Requires an S3-compatible service accessible via AWS SDK v3 client.
  • Needs credentials with sufficient permissions to generate presigned POST URLs.
  • The node expects configuration of an API key credential providing access key ID, secret access key, optional session token, region, and optionally endpoint and path style settings.
  • Uses AWS SDK packages: @aws-sdk/client-s3 and @aws-sdk/s3-presigned-post.

Troubleshooting

  • Invalid Credentials: Errors related to access keys or secret keys indicate incorrect or missing credentials. Verify the API key credential used has correct values.
  • Permission Denied: If the user lacks permission to generate presigned posts or access the bucket, ensure the IAM policy allows s3:PutObject and related actions.
  • Expiration Limits: The expiration time cannot exceed 7 days (604800 seconds). Setting a higher value will cause errors.
  • Invalid Bucket or Key: Ensure the bucket exists and the key is correctly formatted.
  • Network Issues: Connection errors may occur if the endpoint URL is incorrect or unreachable.

If the node throws an error like S3 operation failed: ..., check the detailed message for clues on misconfiguration or permission issues.


Links and References


If you need details about other operations or further explanation, feel free to ask!

Discussion