Skip to content

Create your first Object Storage bucket and upload an object

Last updated on

  1. In the STACKIT Portal, open your project.
  2. In the sidebar, select Object Storage - Overview.
  3. Select Enable Object Storage.

Object Storage is now enabled in your project. You can start creating buckets and managing credentials.

  1. In the STACKIT Portal, open your project.
  2. In the sidebar, select Object Storage - Credentials & Groups.
  3. Select an existing credential group to open its General information view.
  4. In the navigation bar on the right, select the Credentials tab.
  5. Select Create credentials.
  6. A dialog opens showing your new Access key ID and Secret access key.
  7. Save both values now.

Your credentials appear in the credentials list.

Download the latest release for your platform from the GitHub repository.

Unpack the downloaded archive and move the runnable file to /usr/local/bin:

Terminal window
mv s5cmd /usr/local/bin/

For Debian-based distributions, install the .deb package directly with dpkg:

Terminal window
dpkg -i s5cmd_2.3.0_linux_amd64.deb

Set the required environment variables so s5cmd can connect to your STACKIT Object Storage endpoint.

Terminal window
export S3_ENDPOINT_URL="https://object.storage.eu01.onstackit.cloud"
export AWS_ACCESS_KEY_ID="xxxxxxxxxxxx" export AWS_SECRET_ACCESS_KEY="yyyyyyyyyyyyyyyyyyyyyy"
export AWS_REGION="eu01"
Terminal window
aws s3 mb s3://my-first-bucket \
--endpoint-url https://object.storage.eu01.onstackit.cloud

The output confirms the creation:

make_bucket: my-first-bucket

Create a small test file and upload it to your bucket. Replace my-first-bucket with your actual bucket name:

Terminal window
echo "Hello Object Storage" > hello.txt
aws s3 cp hello.txt s3://my-first-bucket/ \
--endpoint-url https://object.storage.eu01.onstackit.cloud

The output confirms the upload:

upload: ./hello.txt to s3://my-first-bucket/hello.txt

List the contents of your bucket to confirm the object was stored:

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

The output shows your uploaded file:

2024-01-01 10:00:00 21 hello.txt

Your Object Storage bucket is now set up and contains your first object. Continue with the How-tos to manage all features in detail.