Skip to main content

Using S3-compatible CLI tools and curl

This page explains how to set up the most common command-line tools and how to access the API directly using curl.

Example values used (please replace with actual values):

Endpointhttps://s3.internet1.de
Region
Access KeyIHR_ACCESS_KEY
Secret KeyIHR_SECRET_KEY

AWS CLI

Installation & Configuration

# Installation siehe https://docs.aws.amazon.com/cli/
aws configure
# AWS Access Key ID: IHR_ACCESS_KEY
# AWS Secret Access Key: IHR_SECRET_KEY
# Default region name:
# Default output format: json

The endpoint is passed via --endpoint-url for each command – or permanently in ~/.aws/config:

[default]
region =
endpoint_url = https://s3.internet1.de

Typical commands

aws s3 ls                                        # Buckets auflisten
aws s3 mb s3://mein-bucket # Bucket anlegen
aws s3 cp datei.txt s3://mein-bucket/ # Upload
aws s3 cp s3://mein-bucket/datei.txt . # Download
aws s3 sync ./ordner s3://mein-bucket/ordner # Verzeichnis synchronisieren
aws s3 rm s3://mein-bucket/datei.txt # Objekt löschen
aws s3 rb s3://mein-bucket # leeren Bucket löschen

(Always use --endpoint-url https://s3.internet1.de, unless specified in the configuration.)

s3cmd

Configuration in ~/.s3cfg:

[default]
access_key = IHR_ACCESS_KEY
secret_key = IHR_SECRET_KEY
host_base = s3.internet1.de
host_bucket = %(bucket)s.s3.internet1.de
use_https = True
s3cmd ls                          # Buckets auflisten
s3cmd mb s3://mein-bucket # Bucket anlegen
s3cmd put datei.txt s3://mein-bucket/
s3cmd get s3://mein-bucket/datei.txt

MinIO Client (mc)

mc alias set centron https:// IHR_ACCESS_KEY IHR_SECRET_KEY

mc ls centron # Buckets auflisten
mc mb centron/mein-bucket # Bucket anlegen
mc cp datei.txt centron/mein-bucket/
mc mirror ./ordner centron/mein-bucket/ordner

rclone

rclone config
# n) New remote → Name: centron → Storage: s3 → Provider: Other
# access_key_id / secret_access_key eintragen
# region:
# endpoint: https://s3.internet1.de

Or directly in ~/.config/rclone/rclone.conf:

[centron]
type = s3
provider = Other
access_key_id = IHR_ACCESS_KEY
secret_access_key = IHR_SECRET_KEY
region =
endpoint = https://s3.internet1.de
rclone lsd centron:                       # Buckets auflisten
rclone copy ./ordner centron:mein-bucket # Upload
rclone sync centron:mein-bucket ./backup # Download/Sync

Direct API access using curl

For debugging or minimal environments, the API can be accessed directly using curl. S3 requires signed requests (AWS Signature v4); recent versions of curl (≥ 7.75) handle the signing using --aws-sigv4:

# Objekt hochladen
curl -X PUT "https://s3.internet1.de/mein-bucket/datei.txt" \
--user "IHR_ACCESS_KEY:IHR_SECRET_KEY" \
--aws-sigv4 "aws:amz:de-central-1:s3" \
--upload-file ./datei.txt

# Objekt herunterladen
curl "https://s3.internet1.de/mein-bucket/datei.txt" \
--user "IHR_ACCESS_KEY:IHR_SECRET_KEY" \
--aws-sigv4 "aws:amz:de-central-1:s3" \
-o datei.txt

# Bucket-Inhalt auflisten (XML-Antwort)
curl "https://s3.internet1.de/mein-bucket?list-type=2" \
--user "IHR_ACCESS_KEY:IHR_SECRET_KEY" \
--aws-sigv4 "aws:amz:de-central-1:s3"

# Objekt löschen
curl -X DELETE "https://s3.internet1.de/mein-bucket/datei.txt" \
--user "IHR_ACCESS_KEY:IHR_SECRET_KEY" \
--aws-sigv4 "aws:amz:de-central-1:s3"
Info

Publicly readable objects or presigned URLs do not require a signature – a simple curl -O <URL> is sufficient.

Next step

Create first bucket →