# import-file-from-s3

## Description

<mark style="color:purple;">`import-file-from-s3`</mark> *adaptor imports a file from an Amazon S3 compatible object storage server*.\
This Data-flo adaptor accesses files stored on S3, downloads them, and imports them into Data-flo as files, ready for further processing.

The `access key` and `secret key` of the bucket is required if the ACL of the object is set to private.

## Inputs

**`url`**\
Type: `text`\
Required: Yes\
The URL of the file to be imported, e.g., <https://s3.region-code.amazonaws.com/bucket-name/key-name>. Follow [this link](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html#path-style-url-ex) for more information about Amazon S3 bucket.

**`access key`**\
Type: `text`\
Required: No\
The access key is the user-id that uniquely identifies your account. Required when the ACL of the object is private.

**`secret key`**\
Type: `text`\
Required: No\
The secret key is the password to your account. Required when the ACL of the object is private.

## Outputs

**`file`**\
Type: `file`\
The downloaded file.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`url:` <https://s3.amazonaws.com/example-bucket/example-folder/demo.nwk>

#### Outputs:

`file`: demo.nwk

```
(Bovine:0.69395,(Gibbon:0.0,(Orangutan:0.0,(Gorilla:0.0,(Chimp:0.0,Human:0.0)123:0.0)test:0.06124):0.0):0.54939,Mouse:1.21460);
```

-> Imported the Newick file `demo.nwk` from a public S3 bucket.

## Use Cases

* Pulling a Newick tree file into Data-flo to become input to [`export-to-microreact-project`](/data-flo/reference-guide/export-to-microreact-project.md).
* Importing a csv file so it can become input to the [`import-from-csv-file`](/data-flo/reference-guide/import-from-csv-file.md) adaptor.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/import-file-from-s3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
