This page explains how to install the AWS-CLI v2. If you want to follow the installation procedure for v1, refer to the official AWS-CLI documentation page for more information. Furthermore, you must install the awscli-plugin-endpoint
to allow the AWS-CLI v1 to interact with Scaleway Object Storage.
Using Object Storage with the AWS-CLI
The AWS-CLI is an open-source tool built on top of the AWS SDK for Python (Boto) that provides commands for interacting with AWS services. With minimal configuration, you can start using all the functionalities provided by AWS Management.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A valid API key
How to install the AWS-CLI
-
Follow the official AWS CLI installation instructions to download and install the tool according to your environment.
-
Create the file
~/.aws/config
by running the following command:aws configure -
When prompted, enter the following elements:
- your API access key
- your API secret key
- your preferred default Object Storage region (
fr-par
,nl-ams
, orpl-waw
) json
as the default output format
-
Open the
~/.aws/config
file in a code editor and edit it as follows:[default]region = nl-amsoutput = jsonservices = scw-nl-amss3 =max_concurrent_requests = 100max_queue_size = 1000multipart_threshold = 50 MB# Edit the multipart_chunksize value according to the file sizes that you# want to upload. The present configuration allows to upload files up to# 10 GB (1000 requests * 10 MB). For example, setting it to 5 GB allows you# to upload files up to 5 TB.multipart_chunksize = 10 MB[services scw-nl-ams]s3 =endpoint_url = https://s3.nl-ams.scw.cloudNoteSet the
endpoint_url
andregion
corresponding to the geographical region of your bucket. It can either befr-par
(Paris, France),nl-ams
(Amsterdam, The Netherlands) orpl-waw
(Warsaw, Poland).You can also configure additional profiles by adding new blocks under
[default]
. For example, you can add a second profile,[profile two]
, to set a different region and endpoint from your default one:[default]region = nl-amsservices = scw-nl-ams...[profile two]region = fr-parservices = scw-fr-par... -
Optionally, open the
~/.aws/credentials
file and create other profiles by adding a block to indicate their credentials as follows:[default]aws_access_key_id=<ACCESS_KEY>aws_secret_access_key=<SECRET_KEY>[two]aws_access_key_id=<ACCESS_KEY>aws_secret_access_key=<SECRET_KEY> -
Run the following command to test your AWS CLI installation:
aws s3 lsA list of your buckets in the region specified in your profile displays.
NoteUse the
--profile
option if you want to test it using a different profile. Remember to replacetwo
with the name of your profile.aws --profile two s3 ls
Refer to the official documentation for more information on how to configure and manage your AWS CLI v2 settings and credentials.