---
title: "get object · RUAL Documentation"
description: "Downloads an object to a file. The object is streamed to disk, so a large file costs no extra memory."
canonical: https://docs.rual.nl/block-types/object%20storage/s3connection_get_object
language: en
---

[Cluster](https://docs.rual.nl/cluster)

[Blocks](https://docs.rual.nl/block-types)

[Interfaces](https://docs.rual.nl/interfaces)

[Blueprints](https://docs.rual.nl/blueprints)

[Tutorials](https://docs.rual.nl/tutorials)

[Home automation](https://docs.rual.nl/home-automation)

[Examples](https://docs.rual.nl/examples)

[Reference](https://docs.rual.nl/reference)

[Architecture](https://docs.rual.nl/architecture)

[Troubleshooting](https://docs.rual.nl/troubleshooting)

Other

# get object

This block is part of the [`object storage`](https://docs.rual.nl/block-types/object%20storage) group and was last modified in core [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

Downloads an object to a file. The object is streamed to disk, so a large file costs no extra memory.

- flow `flow`

- connection required `s3connection` The object storage connection to use, from an **open connection** block.

- bucket `value` Bucket name. Leave empty to use the bucket set on the connection.

- key required `value` The object key to download.

- flow `flow`

- connection `s3connection` The same connection, so it can be passed to the next block.

- success `condition`

- error `value` `NoSuchKey` when the object does not exist.

- file `file` The downloaded file, in the entity's temp folder.

- size `number` Bytes written to disk.

- content type `value` The object's stored Content-Type.

- etag `value`

- last modified `date` RFC-3339 timestamp, or empty when the server sent none.

- metadata `object` User metadata, with the `x-amz-meta-` prefix stripped from each key.

Downloads `bucket`/`key` and emits it on the `file` pin as a normal blueprint file descriptor : {filename, path, type} inside an ARRAY : written into the entity's temp tree. Streams straight to disk through the atomic writer, so the file never exists under its final name while incomplete and nothing is buffered in memory. The stored filename is a random 12-character prefix plus the key's basename, so two flows downloading the same key cannot collide. Refuses an object over 5 GiB (OBJECT_TOO_LARGE) rather than truncating it. `last_modified` is an RFC-3339 string, or null when the server sent none. A MISSING object is a FAILURE here (success=false, error NoSuchKey) : use s3connection_head_object when absence is an expected branch rather than an error. Other failures: NO_CONNECTION, MISSING_BUCKET, MISSING_KEY, DOWNLOAD_FAILED, COULD_NOT_WRITE_FILE, or an S3 code such as AccessDenied.

| `s3 download` |
| --- |
| `get` |
| `fetch object` |
| `download object` |

## Version history

Introduced in [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

- [Back to `object storage`](https://docs.rual.nl/block-types/object%20storage): Return to the main group to view all sub-groups

- [Back to `object storage`](https://docs.rual.nl/block-types/object%20storage?group=object%20storage): Return to the group to view all blocks within this group

Was this page helpful? [Tell us what to improve](https://docs.rual.nl/support) · RUAL Docs is an integral component of the [RUAL ecosystem](https://rual.nl)
