Learn how to create and manage your Swift Object Storage containers using the OVHcloud Control Panel, Swift S3 API, python-swiftclient, or the OVHcloud CLI.
The Object Storage Swift solution for Public Cloud offers unlimited storage with simple billing tailored to your needs. Containers can be configured for different use cases:
- Static hosting (static website)
- Private hosting (e.g. personal data storage)
- Public hosting (publicly accessible content)
- Cold storage (archiving)
Requirements
- A Public Cloud project in your OVHcloud account
- Depending on the tool you plan to use:
-
Swift S31 API: An environment prepared for the OpenStack API with
python-openstackclientandawscliinstalled -
Swift client: An environment prepared for the OpenStack API with
python-swiftclientinstalled - OVHcloud CLI: The OVHcloud CLI installed and configured
-
Swift S31 API: An environment prepared for the OpenStack API with
OVHcloud Control Panel Access
- Direct link: Public Cloud Projects
-
Navigation path:
Public Cloud> Select your project
Instructions
Preparation
Log in to your OVHcloud Control Panel and open Object Storage in the left-hand menu under Storage & backup.
Set the OpenStack environment variables
Install the OpenStack client if needed
OpenStack client command reference: docs.openstack.org
Create EC2 credentials
S3 tokens require two parameters — access and secret — generated from Keystone:
Configure the AWS client
Install awscli:
Python package
Debian-based OS
RHEL-based OS
Then configure it with the EC2 credentials generated above:
CLI method
Follow the prompts and enter your access key and secret key when asked.
Manual method
Both virtual-hosted-style and path-style access are supported; virtual-hosted-style is recommended, as path-style was deprecated after September 30, 2020.
Set the OpenStack environment variables:
Verify your setup:
For the full list of Swift commands, refer to the OpenStack documentation.
Ensure the OVHcloud CLI is installed and configured with your credentials. For setup instructions, refer to the OVHcloud CLI documentation.
Create a container
When using the Swift S3 API, bucket names must follow these rules:
- Between 3 and 63 characters long
- Lowercase letters, numbers, periods, and dashes only
- Must start with a lowercase letter or number
- No underscores, no consecutive periods, no dashes adjacent to periods
- Not formatted as an IP address (e.g.
198.51.100.24)
Click Create an object container.
Fill in the creation form:
- Container name: Enter a name for your container.
-
Container type: Select
Swift API. - Location: Choose an available location.
- Container type: Choose the access type Static hosting, Private, or Public.
Review the summary panel, then click Create.
S3 buckets can only be created on the PCS (Object Storage) policy.
Create the container:
To make the container publicly accessible:
Verify the configuration:
Container creation is not available via the OVHcloud CLI. Use the Control Panel, the Swift S3 API, or the Swift client instead.
List your containers
Navigate to Object Storage in the left-hand menu. Your containers are listed under the My containers tab.
If you have more than one profile configured, add --profile <profile_name> to the command.
Upload objects
Click on the name of your container, then click Add objects in the Objects tab.
Select the file you want to upload and click Import.
Upload a single file:
Upload an entire folder (a prefix matching the folder name is automatically added to the objects):
Object upload is not available via the OVHcloud CLI. Use the Control Panel, the Swift S3 API, or the Swift client instead.
List objects in a container
Click on the name of your container to view its objects in the Objects tab.
Filter by prefix:
If the container is public, objects are accessible directly via URL:
This URL is composed of an endpoint (available from the Horizon interface), the container name, and the object name (including prefix).
Object listing is not available via the OVHcloud CLI. Use the Control Panel, the Swift S3 API, or the Swift client instead.
Download objects
Click the download icon on the object line.
Download a single file:
Download all files with a given prefix:
Object download is not available via the OVHcloud CLI. Use the Control Panel, the Swift S3 API, or the Swift client instead.
Delete objects and containers
Delete an object: Click the delete icon (trash can) on the object line and confirm.
Delete a container: Click the more options ... button on the container line, then select Delete and confirm.
Delete an object:
Delete a container (the container must be empty first):
Delete a file:
Delete multiple files using a prefix:
Delete a container (also deletes all objects inside it):
Container and object deletion is not available via the OVHcloud CLI. Use the Control Panel, the Swift S3 API, or the Swift client instead.
Go further
For more information and tutorials, please see our other Public Cloud support guides or explore the guides for other OVHcloud products and services.
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.
*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.