Manage S3
Description
Section titled “Description”The Manage S3 module allows managing files in Amazon S3 buckets. It supports two operations: upload of PDF files from a URL and delete of existing files. In upload mode, it downloads the PDF from the URL provided in the input data and uploads it to the specified bucket. It is ideal for storing workflow-generated documents, backing up files, or managing cloud resources on AWS.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| bucketName | text | Yes | S3 bucket name |
| action | select | Yes | Action to perform: upload or delete |
| fileName | text | Yes | File name in S3 (including path if applicable) |
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "pdfUrl": "https://ejemplo.com/documento.pdf" }}Usage Example
Section titled “Usage Example”Upload file
Section titled “Upload file”{ "bucketName": "mi-bucket-documentos", "action": "upload", "fileName": "facturas/factura_001.pdf"}Delete file
Section titled “Delete file”{ "bucketName": "mi-bucket-documentos", "action": "delete", "fileName": "facturas/factura_antigua.pdf"}API Used
Section titled “API Used”- AWS S3:
s3.upload()ands3.deleteObject() - Requires AWS credentials configured in the environment (environment variables or IAM profile)
- Documentation: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html
- In upload mode, the PDF URL is obtained from
data.pdfUrl - Content-Type is set as
application/pdffor upload - AWS credentials are configured at environment level (not at node level); uses
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYvariables, or IAM role - In delete mode, it does not verify if the file exists before attempting deletion
- Currently only supports uploading PDFs from URL
Related Nodes
Section titled “Related Nodes”- HTTP - Download files
- PDF Extractor - Extract text from PDFs
- Save to JSON - Save data to file