Documentation

Connecting to an Object Storage instance

UpCloud’s new Object Storage is fully S3-compliant, meaning any existing S3 client should be able to connect to and access the Object Storage. This includes the AWS Command Line Interface (AWS CLI) tool, which allows you to manage files on UpCloud’s Object Storage as seamlessly as you would on Amazon’s S3 service.

AWS CLI can be installed using the command below:

pip3 install awscli awscli-plugin-endpoint

This installs AWS CLI v1. Instructions for installing AWS CLI v2 can be found here

After you’ve installed AWS CLI you’ll need to create two files: a configuration file to store its settings, and also a credentials file to store the access keys for our Object Storage. The default location for these files is: ~/.aws. If this folder doesn’t already exist, you can create it using the command below:

mkdir -p ~/.aws

After you’ve made the folder, you can go ahead and create the configuration file with the following content:

nano ~/.aws/config
[plugins]
endpoint = awscli_plugin_endpoint

1

If you’re using AWS CLI version 2, you’ll need to add the following line to your configuration file:
cli_legacy_plugin_path = <your-plugin-path>
This line needs to go in the plugins section of the configuration file. Make sure to replace <your-plugin-path> with the actual path where your plugin is located, as it may differ from the example path used below.
How to find your-plugin-path

[plugins]
endpoint = awscli_plugin_endpoint
cli_legacy_plugin_path = /usr/local/lib/python3.10/dist-packages

Next, create the credentials file with the content below:

nano ~/.aws/credentials
[{profile-name}]
region=europe-1
aws_access_key_id={access_key_id}
aws_secret_access_key={secret_access_key}
s3 =
   endpoint_url = https://{domain_name}
s3api =
    endpoint_url = https://{domain_name}
  • For now, the new Object Storage is only available in one region; europe-1
  • Replace {profile-name} with a name that helps you easily identify your Object Storage.
  • Replace {access_key_id}, {secret_access_key}, and {domain_name} with the values you noted down earlier, as shown in the screenshot below.

2

To confirm that everything is working as expected we can run a command that list all the buckets in our Object Storage.

Even though we don’t have any buckets yet, this command should still run successfully if AWS CLI is configured correctly and has the necessary access to our Object Storage.

aws s3 ls --profile=objectstorage-v2

The --profile flag at the end of the command tells AWS CLI which Object Storage profile to use. This is handy if you’ve got multiple Object Storage profiles saved in your credentials file. For this guide, we’re focusing on a single profile named objectstorage-v2, and we’ll use this command to list its buckets.

If everything is set up correctly, you should see a list of your buckets (which will be empty in our case since we don’t have any buckets yet).

3

However, if you don’t have access or if AWS CLI is not configured correctly, you’ll get an error message instead.

4

This should give you a good indication of whether AWS CLI can access your Object Storage.