Learn how to create and manage Object Storage buckets and objects.
If you are using legacy Swift Object Storage, follow this guide.
For new projects, we highly recommend using our S3™*-compatible Object Storage, which benefits from our latest innovations and new features.
Requirements
- A Public Cloud project in your OVHcloud account
- An Object Storage user already created
OVHcloud Control Panel Access
- Direct link: Public Cloud Projects
-
Navigation path:
Public Cloud> Select your project
Instructions
If you wish to use the OVHcloud Terraform provider, see our Manage an Object Storage bucket with Terraform guide.
Preparation
To use the AWS CLI
To find out how to install the AWS CLI in your environment, we recommend you read the official AWS documentation.
Check installation
If you need more information about AWS CLI installation, read the AWS documentation.
Collect Credentials
- Retrieve your user's Access key and Secret key. You can retrieve this information from the OVHcloud Control Panel under
Public Cloud>Object Storage>Users. - You will also need your endpoint_url and the region. If you have already created your container, find this information in the
My containerstab in the details of your container. If needed, see our Object Storage - Endpoints and geoavailability guide.
Where to find the Endpoint URL of a container
Click the name of the container and then the General information tab.
Configuration
Use the interactive configuration to generate the configuration files, or create them manually.
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:
Here are the configuration values you can set:
| Variable | Type | Value | Definition |
|---|---|---|---|
| max_concurrent_requests | Integer | Default: 10 | The maximum number of simultaneous requests. |
| max_queue_size | Integer | Default: 1000 | The maximum number of tasks in the task queue. |
| multipart_threshold | Integer String |
Default: 8 MB | The size threshold that the CLI uses for multipart transfers of individual files. |
| multipart_chunksize | Integer String |
Default: 8 MB Minimum for uploads: 5 MB |
When using multipart transfers, this is the byte size that the CLI uses for multipart transfers of individual files. |
| max_bandwidth | Integer | Default: None | The maximum bandwidth that will be used to load and download data to and from your buckets. |
| verify_ssl | Boolean | Default: true | Enable / Disable SSL certificate verification |
For a list of endpoints by region and storage class, see the Object Storage - Endpoints and geoavailability guide.
Usage
If you have more than one profile, add --profile <profile_name> to the command line.
Using the OVHcloud Control Panel
To manage an Object Storage bucket, navigate to Object Storage in the left-hand menu.
Listing your buckets
Via AWS s3
Via AWS S3API
Click on Object Storage in the navigation bar on the left and then on the My containers tab.
See our Getting Started with OVHcloud CLI guide to learn about the OVHcloud CLI.
Enter the following command:
Create a bucket
Via AWS s3
Via AWS S3API
Click + Create an object container.
You can enter the name of your bucket (optional) and then select your offer.
Select a deployment mode.
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.
Regions can vary depending on the chosen deployment mode.
You can then set the configuration parameters for your bucket.
At this stage, you can decide whether or not to enable 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; enable it if needed. For more information about versioning, see our Object Storage - Getting started with versioning guide.
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.
NOTE: This option must be enabled when creating a bucket, it cannot be enabled later.
You must link a user to the bucket.
To do this, you can either:
- Link an existing Object Storage user. To check the credentials, click on
View credentials. - Or create a new Object Storage user.
You can now decide whether or not you wish to encrypt your data using SSE-OMK (server-side encryption with OVHcloud Managed Keys).
Once you have finished configuring your bucket, click Create.
See our Getting Started with OVHcloud CLI guide to learn about the OVHcloud CLI.
Enter the following command, replacing <region> with your region code (e.g., US-EAST-VA) and <bucket_name> with the desired name:
To create a bucket with versioning and encryption enabled:
To create a bucket with Object Lock enabled:
The --object-lock-status enabled option must be set at bucket creation time; it cannot be enabled later.
Uploading your files as objects in your bucket
When uploading objects, select a storage class to control availability, redundancy, and cost. To help you choose the right storage class for your needs, see the Choosing the right storage class for your needs guide.
The aws s3 cp command will use STANDARD as default storage class for uploading objects. To store objects in the High Performance tier, use the aws s3api put-object command instead, as aws s3 cp does not support the EXPRESS_ONEZONE storage class, which is used to map the High Performance storage tier. To learn more about the storage class mapping between OVHcloud storage tiers and AWS storage classes, you can check our documentation here.
Via AWS s3
To upload an object:
Via AWS S3API
To upload an object:
Click on the name of your container, then click + Add objects.
You can add a prefix to your object name (the object name is the same as the file name). Select the storage class. Finally, select the file you are about to download and click on the Import button.
Downloading an object from a bucket
Via AWS s3
Downloading an object from a bucket:
Uploading an object from one bucket to another bucket:
Downloading or uploading an entire bucket to the host/bucket:
Via AWS S3API
Downloading an object from a bucket:
Uploading an object from one bucket to another bucket:
Click on the download icon to the right of the object.
Synchronizing buckets
Via AWS CLI
Deleting objects and buckets
A bucket can only be deleted if it is empty.
If your bucket has Object Lock enabled, you will not be able to permanently delete your objects. See our documentation to learn more about Object Lock. If you use Object Lock in GOVERNANCE mode and have the permission to bypass GOVERNANCE mode, you will have to add the --bypass-governance-retention option to your delete commands.
Via AWS s3
To delete an object:
To remove all objects from a bucket:
To delete a bucket, it must be empty:
If the bucket is not removed, you can use the same command with the --force option. This deletes all objects from the bucket, and then deletes the bucket.
Deleting objects and buckets with versioning enabled:
If versioning is enabled, a standard delete operation on your objects will not permanently remove them.
To permanently delete an object, you must specify a version ID:
To list all objects and their version IDs, you can use the following command:
With the above delete-object command, you will have to iterate over all your object versions. You can also use the following one-liner to empty your bucket:
Via AWS S3API
Deleting objects and buckets:
Deleting objects and buckets with versioning enabled:
If versioning is enabled, a standard delete operation on your objects will not permanently delete them.
To permanently delete an object, you need to specify a version identifier:
Deleting a bucket:
In the list of object storage containers, click the more options ... button to the right, then select Delete.
Type TERMINATE to confirm your choice, and click Confirm.
Deleting objects:
Go to the Objects tab of the relevant bucket and click the Delete 🗑️ icon to the right of the object line.
Type PERMANENTLY DELETE to confirm your choice, and click on Delete.
See our Getting Started with OVHcloud CLI guide to learn about the OVHcloud CLI.
Deleting objects
Deleting a bucket
The bucket must be empty before deletion.
Deleting objects with versioning enabled
If versioning is enabled, specify the version ID to permanently delete an object:
To delete all versions of an object, combine the version list and deletion:
Manage tags
Via AWS S3API
Setting tags on a bucket:
Deleting tags on a bucket:
Setting tags on an object:
Deleting tags on an object:
See our Getting Started with OVHcloud CLI guide to learn about the OVHcloud CLI.
The OVHcloud CLI lets you set tags on a bucket at creation time or when editing it via the --tag key=value option (repeatable for multiple tags). Individual tag management (reading, deleting) is not available via the CLI.
Setting tags when creating a bucket
Updating tags on an existing bucket
Go further
For more information and tutorials, please see our other Object Storage support guides or explore the guides for other OVHcloud products and services.
*S3 is a trademark filed by Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.