Jump toUpdate content
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 of the functionalities provided by the AWS Management.
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
- You have an account and are logged into the Scaleway console
- You have configured your API keys
This page uses AWS-CLI v1. If you want to follow the installation procedure for v2, see the AWS-CLI documentation page.
How to install 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 of the functionality provided by the AWS Management.
To interact with Object Storage,
awscli-plugin-endpoint need to be installed. The
awscli-plugin-endpoint is a great plugin to help people more easily access third-party S3 providers.
pip.pip3 install awsclipip3 install awscli-plugin-endpoint
Create the file
~/.aws/configby running the following command:aws configure set plugins.endpoint awscli_plugin_endpoint
~/.aws/configin a text editor and edit it as follows:[plugins]endpoint = awscli_plugin_endpoint[default]region = nl-amss3 =endpoint_url = https://s3.nl-ams.scw.cloudsignature_version = s3v4max_concurrent_requests = 100max_queue_size = 1000multipart_threshold = 50MB# 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 * 10MB). For example setting it to 5GB allows you to upload files up to 5TB.multipart_chunksize = 10MBs3api =endpoint_url = https://s3.nl-ams.scw.cloud
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:[plugins]endpoint = awscli_plugin_endpoint[default]region = nl-amss3 =endpoint_url = https://s3.nl-ams.scw.clouds3api =endpoint_url = https://s3.nl-ams.scw.cloud[profile two]region = fr-pars3 =endpoint_url = https://s3.fr-par.scw.clouds3api =endpoint_url = https://s3.fr-par.scw.cloudImportant:
If you are using the AWS-CLI v2, you must include the path to the plugin in your configuration file. Add
cli_legacy_plugin_path = <path-to-plugin>to the
<path-to-plugin>with the corresponding path.Note:
regioncorresponding to the geographical region of your bucket. It can either be
nl-ams(Amsterdam, The Netherlands) or
Generate a credentials file using the command:aws configure
~/.aws/credentialsfile and configure your API key as follows:[default]aws_access_key_id=<ACCESS_KEY>aws_secret_access_key=<SECRET_KEY>
If you have other profiles, add a block to indicate their credentials.[two]aws_access_key_id=<ACCESS_KEY>aws_secret_access_key=<SECRET_KEY>
Test your cluster.aws s3 ls
--profileoption if you want to test it using a different profile. Remember to replace
twowith the name of your profile.aws --profile two s3 ls