Your opinion helps us make a better documentation.
Was this page helpful?
Using Object Storage with the AWS-CLI
Reviewed on 28 February 2025 • Published on 16 July 2018
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.
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 pagefor more information. Furthermore, you must install the awscli-plugin-endpoint to allow the AWS-CLI v1 to interact with Scaleway Object Storage.
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, or pl-waw)
json as the default output format
Open the ~/.aws/config file in a code editor and edit it as follows:
[default]
region = nl-ams
output = json
services = scw-nl-ams
[services scw-nl-ams]
s3 =
endpoint_url = https://s3.nl-ams.scw.cloud
max_concurrent_requests = 100
max_queue_size = 1000
multipart_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
s3api =
endpoint_url = https://s3.nl-ams.scw.cloud
Note
Set the endpoint_url and region corresponding to the geographical region of your bucket. It can either be fr-par (Paris, France), nl-ams (Amsterdam, The Netherlands) or pl-waw (Warsaw, Poland).
Optionally, 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 services from your default one:
[default]
region = nl-ams
services = scw-nl-ams
[profile two]
region = fr-par
services = scw-fr-par
Configure additional services by adding a new block after [service scw-nl-ams]. For example, you can create a second services block called [services scw-fr-par], as shown below:
[services scw-fr-par]
s3 =
endpoint_url = https://s3.fr-par.scw.cloud
max_concurrent_requests = 100
max_queue_size = 1000
multipart_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
s3api =
endpoint_url = https://s3.fr-par.scw.cloud
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>
Important
The profile names from the configuration file (here, [profile two]) and from the credentials file (here, [two]) must be identical.
Run the following command to test your AWS CLI installation:
aws s3 ls
A list of your buckets in the region specified in your profile displays.
Note
Use the --profile option if you want to test it using a different profile. Remember to replace two with the name of your profile.
aws --profile two s3 ls
Refer to the
official documentationfor more information on how to configure and manage your AWS CLI v2 settings and credentials.
Thank you for the feedback!
Your opinion helps us make a better documentation.