Skip to content

S3 Writer

Upload a file to an Amazon S3 bucket, using a specific path and filename.

How it Works

The S3 Writer component takes the content of a file, a destination folder (S3 prefix), and a file name. When you run the component, it uses your stored AWS credentials to connect to Amazon S3. It then uploads the file content to the chosen bucket and folder, creating the file with the name you provided. After the upload finishes, the component returns the full S3 path where the file was stored, so you can use that path later in your workflow.

Inputs

  • File content: The data that will be written to S3. You can paste text, pass a file from a previous step, or use any data type that the system can handle.
  • S3 Prefix to upload file: The folder path inside the bucket where the file should be stored. Use the file selector to choose an existing folder or create a new one.
  • S3 Object: The name you want to give the uploaded file (e.g., report.csv). This field is required.

Outputs

  • Path to File: After the upload, the component returns the full S3 URL or key of the stored file. This can be used to reference the file in later steps, such as sending it to another service or logging its location.

Usage Example

  1. Prepare the file – In a previous step, read a CSV file from your local system or generate data in the workflow.
  2. Configure the S3 Writer
    • Set File content to the data from the previous step.
    • Choose a S3 Prefix to upload file like my-project/data/.
    • Enter S3 Object as daily_report.csv.
  3. Run the workflow – The component uploads the file to my-project/data/daily_report.csv in your S3 bucket.
  4. Use the output – Connect the Path to File output to a logging component or pass it to another service that needs the file location.
  • S3 Reader – Download files from S3 for processing.
  • S3 Lister – List files in a specific S3 folder.
  • S3 Deleter – Remove files from S3 when they are no longer needed.

Tips and Best Practices

  • Keep your AWS credentials secure; the component uses a credential token stored in your Nappai account.
  • Use descriptive file names and folder structures to make it easier to locate files later.
  • If you need to upload large files, consider splitting them into smaller chunks or using a dedicated file transfer component that supports multipart uploads.
  • Verify the S3 bucket’s region matches the region configured in your credentials to avoid cross‑region transfer costs.

Security Considerations

The component requires a valid AWS credential token. Make sure the token has only the permissions needed for uploading files (e.g., s3:PutObject). Avoid giving broader permissions than necessary to reduce the risk of accidental data exposure.