This page shows you how to use Object Storage with s3cmd.
- You have an account and are logged into cloud.scaleway.com
- You have generate your API Token
Object Storage allows you to store any kind of object (documents, images, videos, etc.). You can retrieve them anytime and from anywhere.
For instance, you can store images and they will be accessible using HTTP. You can use the control panel to manage your storage. As our API is S3 compatible, a lot of existing tools exist to interact with the object storage.
This guide will show you how to use the Object Storage with one of these tools, s3cmd.
There are four steps to configure and use s3cmd:
Before starting, click the “Storage” button in the control panel.
You will land on the Storage page. Then, click on the “S3 Credentials” button.
The credentials required to access the Object Storage are displayed:
host_basebase url to access the storage service,
access_keythe access key for the storage,
secret_keythe API Token you generated previously.
A simple solution to begin with Object Storage is to use the S3cmd tool, which is a client for S3 Object Storage.
S3cmd allows you to create, list and delete buckets, download, upload, and delete objects inside the Object Storage. First, you need to download S3cmd on github here.
If you use Linux or OS X, your package manager probably has a package for s3cmd.
We will configure S3cmd to work with Object Storage. The following is basic configuration example to use Object Storage with S3cmd.
In a terminal, create a file named
.s3cfg in your home directory.
access_key = <your_access_key> and
secret_key = <your_secret_key> with your credentials.
The following command will create a bucket to store objects with S3cmd. A bucket name must contain only alphanumeric and lowercase characters.
The following command will upload
photo1.jpg into the bucket
The following command will list the objects inside a bucket:
The following command will download the object
The following command will delete the object
movie1.avi from the bucket
The following command will remove the bucket