# Share Objects with Pre-Signed URLs

By default, objects in the <code class="expression">space.vars.ionos\_cloud\_object\_storage</code> are private and only the bucket owner has permission to access them. Only the bucket owner can generate a pre-signed URL for objects and grant time-bound permission to other users to access these objects. It is a secure and user-friendly way to share private objects stored in your Object Storage with other users.

{% hint style="info" %}
**Note:** For a contract-owned bucket, in addition to the bucket owner, the administrator has permission to generate a pre-signed URL for objects and grant time-bound permission to other users to access these objects.
{% endhint %}

This way, the objects are made publically available for users with the object's pre-signed URL; however, you could limit the period of access to the object.

## Use cases

* Pre-signed URLs are ideal for providing temporary access to a specific object without needing to change the object's permissions or share your credentials with other users.
* Allows other users to upload objects directly to your Object Storage bucket without needing to provide them with access and secret keys.

## DCD

1\. In the **DCD**, go to **Menu** > **Storage & Backup** > **IONOS Object Storage**.

2\. From the drop-down list in the **Buckets** tab, choose either to **Show user-owned buckets** or **Show contract-owned buckets** depending on the bucket type you want to view.

3\. From the **Buckets** list, choose the bucket from which you want to share the objects. The list of objects in the bucket is listed.

4\. Select the object to share and click **Generate Pre-Signed URL**.

![Select generate pre-signed URL](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-324c8d75ebc128817ff0e011abc98acba179d0a0%2Fobject-storage-generate-pre-signed-url.png?alt=media)

5\. Enter the expiration time for the URL and choose whether the specified time refers to seconds, minutes, hours, or days.

6\. Click **Generate**.

![Generate pre-signed URL](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-12152c9d03bc3b9feaaf89372558440dd7dc1cf7%2Fs3-pre-signed-url.png?alt=media)

7\. Copy the generated pre-signed URL and share it with users who require access to this object.

{% hint style="success" %}
**Result:** The pre-signed URL for the selected object is generated successfully and copied to the clipboard. The URL is valid for the period defined during URL generation.
{% endhint %}

## CLI

{% hint style="info" %}
**Prerequisites:**

* Set up the AWS CLI by following the [<mark style="color:blue;">installation instructions</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/s3-tools/awscli).
* Make sure to consider the supported [<mark style="color:blue;">Endpoints</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/endpoints).
  {% endhint %}

Generate a pre-signed URL for `my-object.txt` in the `my-bucket` bucket which will expire in 3600 seconds:

```
aws s3 presign s3://MY-BUCKET/my-object.txt --expires-in 3600 --endpoint-url https://s3-eu-central-2.ionoscloud.com
```

## API and SDKs

The creation of pre-signed URLs does not involve a dedicated API by design. These URLs are generated locally via a signing algorithm using your credentials without relying on the S3 API. To create these URLs, use the appropriate SDK for your programming language.

<code class="expression">space.vars.ionos\_cloud\_object\_storage</code> is S3-compatible, allowing seamless integration with any SDK supporting the S3 protocol for tasks like generating pre-signed URLs. For generating pre-signed URLs using SDKs, see the following AWS methods: [<mark style="color:blue;">Python</mark>](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html), [<mark style="color:blue;">Go</mark>](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/s3-example-presigned-urls.html), [<mark style="color:blue;">Java 2.x.</mark>](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/examples-s3-presign.html), [<mark style="color:blue;">JavaScript 2.x.</mark>](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/examples-s3-presign.html), [<mark style="color:blue;">JavaScript v3</mark>](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-presigned-url.html), and [<mark style="color:blue;">PHP Version 3</mark>](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-presigned-url.html).


---

# 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.ionos.com/cloud/backup-and-storage/ionos-object-storage/how-tos/share-objects-pre-signed-urls.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.
