# How does S3 Cloud Storage work

### Graphical Data flow

<figure><img src="/files/aZvVGadmKSQDoxSP1cOZ" alt=""><figcaption><p>S3 Cloud Storage - Data flow</p></figcaption></figure>

### Data flow

1. **Upload:** The process begins with the upload of a file to the system.
2. **In-transit Encryption:** As the file is being uploaded, it is encrypted to protect its contents while it is being transmitted over the network.
3. **Encryption:** Once the file reaches its destination, it undergoes another layer of encryption for additional security while at rest. Also read [Data security](/s3-cloud-storage-intro/s3-cloud-storage-security.md)
4. **Data Chunking:** The encrypted file is then divided into smaller chunks, which makes it easier to manage, store, and retrieve. Also read [Data security](/s3-cloud-storage-intro/s3-cloud-storage-security.md)
5. **Host & Store:** These chunks are then hosted and stored across the decentralized network of storage nodes provided by Filecoin.
6. **Data Lookup:** When the file is requested for download, the system performs a lookup to find all the chunks that constitute the original file.
7. **Reassembly:** The system reassembles the chunks back into the original file format.
8. **Decryption:** Before the file is provided to the downloader, it is decrypted to make it accessible.
9. **In-transit Encryption:** As the file is being transmitted back to the requester, it is encrypted again to ensure security during transit.
10. **Download:** Finally, the file is downloaded by the requester, at which point it can be decrypted and accessed.

This process as part of the S3 Cloud Storage infrastructure highlights how it integrates with Filecoin’s decentralized network to provide enhanced security, cost efficiency, and reliable data availability for cloud storage.


---

# 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://docs.decentrally.cloud/s3-cloud-storage-intro/how-does-s3-cloud-storage-work.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.
