Scaleway recently launched an Object Storage service with API that is Amazon S3-compatible. This service is still in Beta stage but you can request for free early access. Cloud Object Storage gives you a simple way to store and distribute your content no matter the amount of data – Scale to Petabytes.
You can use Object Storage to store anything from system logs, backups, web content, API, libraries e.t.c. In this guide, I’ll take you through the setup of a bucket on Scaleway and uploading files to it using AWS-CLI.
How to setup Scaleway Object Storage
Below are the steps you need to follow to have a working Scaleway object store ready for file uploads.
Step 1: Signup to scaleway
Create a scaleway account using the link https://cloud.scaleway.com/#/signup. You’ll need to set a billing method – [ Card payment ] while setting up the account.
Step 2: Create API Token
Once the account is created, proceed to create API token to be used in AWS CLI configuration section. Login to Scaleway dashboard and open the link https://cloud.scaleway.com/#/credentials
Click the “Create new token” button
The secret key will be shown only once. Be careful and save it!
Step 3: Create a bucket on scaleway
Once you have API token generated, create a bucket that will store your files. For this, use the link https://cloud.scaleway.com/#/buckets
Give the bucket a name and click the “Create Bucket” button.
Step 4: Install AWS-CLI
The next step is to install
awscli-plugin-endpoint used to interact with Scaleway Object Storage service. The awscli-plugin-endpoint is a great plugin to help people more easily access third-party S3 providers.
pip module manager to install the packages.
sudo pip install awscli
sudo pip install awscli-plugin-endpoint
Step 5: Configure AWS-CLI
~/.aws/ directory that will store access information
Then create a configuration file
~/.aws/config with the following content
[plugins] endpoint = awscli_plugin_endpoint [default] region = nl-ams s3 = endpoint_url = https://s3.nl-ams.scw.cloud max_concurrent_requests = 100 max_queue_size = 1000 s3api = endpoint_url = https://s3.nl-ams.scw.cloud
region from the bucket name details page.
Create the file
~/.aws/credentials to store your Scaleway access credentials.
<SECRET_KEY> printed out in Step 2
Test connection to the Object store with your
$ aws s3 ls 2018-09-28 17:02:43 computingforgeeks-backups
Try to upload a file
$ aws s3 cp computingforgeeks.tar.gz s3://computingforgeeks-backups/
Check the file to confirm it was uploaded.
$ aws s3 ls s3://computingforgeeks-backups
2018-09-28 18:33:05 1389731840 computingforgeeks.tar.gz
The files uploaded should be visible on Scaleway dashboard
I’ll prepare AWS S3 CLI cheat sheet for administering S3-compatible Object storage service. Until then, stay tuned and enjoy your time!