For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/pt/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/pt/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/pt/guides/storage-and-backup/object-storage/s3-getting-started-with-object-storage.md.
Ir para o conteúdo

Object Storage - Getting started

Ver como Markdown

This guide is designed to familiarise you with the management of your buckets/objects.

Objective

This guide helps you manage your buckets and objects.

Learn how to create an Object Storage bucket and manage it.

Info

If you are using legacy Swift Object Storage, then:

  • for Standard object storage - SWIFT API storage class, follow this guide.
  • for Cloud Archive - SWIFT API storage class, follow this guide.

For new projects, we highly recommend using our S31-compatible Object Storage which benefits from our latest innovations and new features.

Requirements


OVHcloud Console Access

  • Direct link:
  • Navigation path: Public Cloud > Select your project > Storage > Object Storage

Instructions

Info

If you wish to use the OVHcloud Terraform provider, you can follow this guide.

Preparation

To use the AWS CLI

To find out how to install the AWS CLI in your environment, we recommend reading the official AWS documentation.

Check installation

aws --version
Info

If you need more information about AWS CLI installation, read the AWS documentation.

Collect Credentials

  • You will need your user's Access key and Secret key. In the OVHcloud Console, open the Users tab of the Object Storage page: the access key is shown in the Access key column. To display the secret key, click the ... button on the user's row, then Show secret key.
  • You will also need your endpoint_url. If you have already created your bucket, it is shown on the bucket's Overview tab (see below). Otherwise, follow this guide.

Where to find the Endpoint URL of a bucket?

In the Containers tab, click the name of your bucket, then open the Overview tab. The endpoint URL is shown in the Endpoint field of the Connection details section.

Configuration

You can either use the interactive configuration to generate the configuration files or manually create them.

Info

To use the interactive configuration, run the following command:

aws configure

or:

aws configure --profile <profile_name>

The configuration file format in the AWS client is as follows:

cat ~/.aws/credentials

[default]
aws_access_key_id = <access_key>
aws_secret_access_key = <secret_key>
cat ~/.aws/config

[default]
region = <region_in_lowercase>
endpoint_url = <endpoint_url>
services = ovh-rbx-archive

[profile <profile_name>]
region = rbx
output = json
services = ovh-rbx

[services ovh-rbx-archive]
s3 =
  endpoint_url = https://s3.rbx-archive.io.cloud.ovh.net/
  signature_version = s3v4

s3api =
  endpoint_url = https://s3.rbx-archive.io.cloud.ovh.net/

[services ovh-rbx]
s3 =
  endpoint_url = https://s3.rbx.io.cloud.ovh.net/
  signature_version = s3v4

s3api =
  endpoint_url = https://s3.rbx.io.cloud.ovh.net/

Here are the configuration values that you can specifically set:

VariableTypeValueDefinition
max_concurrent_requestsIntegerDefault: 10The maximum number of simultaneous requests.
max_queue_sizeIntegerDefault: 1000The maximum number of tasks in the task queue.
multipart_thresholdInteger
String
Default: 8MBThe size threshold that the CLI uses for multipart transfers of individual files.
multipart_chunksizeInteger
String
Default: 8MB
Minimum for uploads: 5MB
When using multipart transfers, this is the byte size that the CLI uses for multipart transfers of individual files.
max_bandwidthIntegerDefault: NoneThe maximum bandwidth that will be used to load and download data to and from your buckets.
verify_sslBooleanDefault: trueEnable / Disable SSL certificate verification

For a list of endpoints by region and storage class, refer to this page.

Usage

Info

If you have more than one profile, add --profile <profile_name> to the command line.

Using the OVHcloud Console

To manage an Object Storage bucket, click Object Storage under Storage in the left-hand menu of your Public Cloud project.

Listing your buckets

OVHcloud Console
AWS CLI
OVHcloud CLI

Click Object Storage under Storage in the left-hand menu of your Public Cloud project. Your buckets are listed in the Containers tab.

Create a bucket

OVHcloud Console
AWS CLI
OVHcloud CLI

In the Containers tab, click Create an object container.

In the Container type section, select S3-compatible API, then enter the name of your bucket in the Container name section (3 to 63 lowercase characters, . and - allowed).

Select a deployment mode.

Info

OVHcloud provides multiple deployment modes to meet different needs in terms of resilience, availability and performance. Each mode is optimized for specific use cases and offers varying levels of redundancy and fault tolerance.

Select a region.

Info

Regions can vary depending on the chosen deployment mode.

If you have selected a 3-AZ region, the Offsite Replication section lets you replicate your data automatically to a remote site. Enabling it also enables versioning.

In a Local Zone region, the bucket is created with its name only. In the other regions, you can then configure the following sections.

Versioning: versioning allows you to keep multiple variants of an object in the same bucket. This feature helps preserve, retrieve, and restore every version of every object stored in your buckets, making it easier to recover from unintended user actions or application failures. By default, versioning is disabled on buckets, and you must explicitly enable it. Find more information about versioning on our dedicated guide.

Object Lock: you can also enable Object Lock to store your objects in WORM (Write Once, Read Many) mode and guarantee their immutability for a defined retention period. Versioning must be enabled first. Then tick I understand that Object Lock cannot be disabled later.

Info

Note: this option must be enabled when creating a bucket, it cannot be enabled later.

User: you can link an Object Storage user to the bucket. Select an existing user in the list (click View credentials to check their credentials), or click Create a user to create one. The secret key of a new user is shown only once: save it.

Encryption: you can decide whether or not you wish to encrypt your data using SSE-OMK (server-side encryption with OVHcloud Managed Keys). Select Server-side encryption (SSE-OMK) or No encryption.

Check the summary of your bucket, then click Create.

Uploading your files as objects in your bucket

When uploading objects, you can select a storage class to control availability, redundancy, and cost. To help you in choosing the best class for your requirements, check the documentation here.

OVHcloud Console
AWS CLI

In the Containers tab, click the name of your bucket: its Objects tab opens. Click Add an object.

In the panel that opens, you can enter a Prefix to add to the name of your objects (the object name is the same as the file name) and select a Storage class. Drag and drop your files or click Browse files, then click Upload.

Downloading an object from a bucket

OVHcloud Console
AWS CLI

In the Objects tab of your bucket, click the Download icon on the object row.

Synchronising buckets

AWS CLI
aws s3 sync . s3://<bucket_name> # Synchronising local directory to the S3 bucket
aws s3 sync s3://<bucket_name> . # Synchronising S3 bucket to the local directory
aws s3 sync s3://<bucket_name> s3://<bucket_name_2> # Synchronising an S3 bucket to another one

Deleting objects and buckets

Info

With the AWS CLI, a bucket can only be deleted if it is empty. In the OVHcloud Console, a bucket containing up to 2,000 objects is emptied and then deleted (except in a Local Zone). Above that, empty it first with a lifecycle rule.

OVHcloud Console
AWS CLI
OVHcloud CLI

Deleting a bucket

In the Containers tab, click the ... button on the bucket row, then Delete.

Type TERMINATE to confirm (EMPTY AND TERMINATE if the bucket still contains objects), then click Delete.

Deleting objects

Go to the bucket and open the Objects tab.

Click the Delete icon on the object row, then click Delete to confirm. If versioning is not enabled on the bucket, the deletion is permanent.

Manage tags

AWS CLI
OVHcloud CLI

Setting tags on a bucket:

aws s3api put-bucket-tagging --bucket <bucket_name> --tagging 'TagSet=[{Key=myKey,Value=myKeyValue}]'
aws s3api get-bucket-tagging --bucket <bucket_name>
{
  "TagSet": [
    {
    "Value": "myKeyValue",
    "Key": "myKey"
    }
  ]
}

Deleting tags on a bucket:

aws s3api delete-bucket-tagging --bucket <bucket_name>

Setting tags on an object:

aws s3api put-object-tagging --bucket <bucket_name> --key <object_name> --tagging 'TagSet=[{Key=myKey,Value=myKeyValue}]'
aws s3api get-bucket-tagging --bucket <bucket_name>
{
  "TagSet": [
    {
    "Value": "myKeyValue",
    "Key": "myKey"
    }
  ]
}

Deleting tags on an object:

aws s3api delete-object-tagging --bucket <bucket_name> --key <object_name>

Go further

For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.

Join our community of users.

1: S3 is a trademark of Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.

Esta página foi útil?