Download Objects

An object in the Object Storage can be viewed and downloaded to your local computer. On downloading, the SSE-S3 encryption applied to that object is automatically decrypted before the download process begins. In the case of SSE-C, you need to provide the encryption keys for download. This feature is unavailable in the web console, but you can use CLI tools, SDK, or API to download objects protected with SSE-C encryption.

You can download objects through one of the following methods:

For large objects, you may not need to download the entire file. You can perform a partial download of objects using the Object Storage API. The API allows you to specify a byte range in your request, enabling you to download only a portion of the object data.

Note: An object's metadata can be viewed directly from the properties page in the web console or through the API call, providing a quick way to inspect an object's properties without incurring data transfer fees. Data transfer fees apply when you download objects from your S3 bucket. For more information, see Pricing Model.

Web console

Using the web console, you can download one object at a time. For downloading multiple objects, consider using CLI tools, SDKs, or REST API.

1. In the DCD, go to Menu > Storage > IONOS S3 Object Storage.

2. From the Buckets list, choose the bucket from which you want to download the object. The list of objects in the bucket is listed.

3. Choose the object to download and click on the respective object's action menu (three dots). The Download option is also available from the respective object's properties page.

4. Click Download. If an object has been shared through a public URL, click the URL to download the object.

Result: The object is successfully downloaded.

IONOS S3 Object Storage API

Using the Object Storage API, you can download objects from a bucket.

CLI

To download my-object.txt to a specified file locally:

aws s3 cp s3://my-bucket/my-object.txt my-object.txt  --endpoint-url https://s3-eu-central-2.ionoscloud.com

To download a specified version of the my-object.txt to a specified file locally:

aws s3api get-object --bucket my-bucket --key some-prefix/my-object.txt my-object.txt --version-id fe11a12a-870b-050f-bc9d-3cecefb1f7c4 --endpoint-url https://s3-eu-central-2.ionoscloud.com

To download all the objects from the my-bucket bucket to the local directory my-dir:

aws s3 cp s3://my-bucket my-dir --recursive --endpoint-url https://s3-eu-central-2.ionoscloud.com

To recursively copy all objects with the /my-dir/ prefix from my-bucket-1 to my-bucket-2:

aws s3 cp s3://my-bucket-1/my-dir/ s3://my-bucket-2/my-dir/ --recursive --exclude "*.log" --endpoint-url https://s3-eu-central-2.ionoscloud.com

To get the object’s metadata without downloading an object:

aws s3api head-object --bucket my-bucket --key myobject.txt --endpoint-url https://s3-eu-central-2.ionoscloud.com

For more information, see the cp, get-object, and head-object command references.

Last updated