Skip to content

Set up CLI Client for Object Storage

Last updated on

The AWS CLI is a command-line tool for managing files in S3-compatible object storage. Use this guide to install the AWS CLI and configure it to connect to STACKIT Object Storage.

Terminal window
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Run the interactive configuration command and enter your STACKIT Object Storage credentials when prompted:

Terminal window
aws configure

The command prompts you for four values:

The CLI writes these values to ~/.aws/credentials and ~/.aws/config.

The AWS CLI targets Amazon S3 endpoints by default. To use STACKIT Object Storage, you must point it at the STACKIT endpoint for your region.

Add the --endpoint-url flag to every command you run:

Terminal window
aws s3 ls --endpoint-url https://object.storage.eu01.onstackit.cloud

The examples in the following sections assume you have configured the endpoint in ~/.aws/config. If you passed --endpoint-url instead, append --endpoint-url https://object.storage.eu01.onstackit.cloud to each command.

For an overview of available commands and operations, see Create and manage buckets and Create and manage objects.