NavigationContentFooter
Jump toSuggest an edit

Using Object Storage with the AWS-CLI

Reviewed on 19 August 2024Published 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.

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
Note

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.

How to install the AWS-CLI

  1. Follow the official AWS CLI installation instructions to download and install the tool according to your environment.

  2. Create the file ~/.aws/config by running the following command:

    aws configure
  3. 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
  4. Open the ~/.aws/config file in a code editor and edit it as follows:

    [default]
    region = nl-ams
    output = json
    services = scw-nl-ams
    s3 =
    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
    [services scw-nl-ams]
    s3 =
    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).

    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-ams
    services = scw-nl-ams
    ...
    [profile two]
    region = fr-par
    services = scw-fr-par
    ...
  5. 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>
  6. 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 documentation for more information on how to configure and manage your AWS CLI v2 settings and credentials.

Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway