Getting started
Quickstart
Get objects flowing through the Stihost edge in under five minutes. This guide uses the AWS CLI, but every S3-compatible SDK works the same way.
1. Create an access key
From the dashboard, open Settings → Access Keys and generate a key pair. Then configure your environment:
export AWS_ACCESS_KEY_ID="STI..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_DEFAULT_REGION="eu-central"2. Point the CLI at Stihost
All API calls go through the regional S3 endpoint:
aws configure set endpoint_url https://s3.stihost.net
# create a bucket
aws s3 mb s3://my-bucket
make_bucket: my-bucket3. Upload and serve
Objects are immediately available from the global edge at cdn.stihost.net:
aws s3 cp ./index.html s3://my-bucket/ --acl public-read
upload: ./index.html to s3://my-bucket/index.html
curl -I https://cdn.stihost.net/my-bucket/index.html
HTTP/2 200
content-type: text/html
x-cache: HIT
age: 12
cache-control: public, max-age=3600Using the SDK
The same works from any language. Node.js example with the AWS SDK v3:
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
const s3 = new S3Client({
endpoint: "https://s3.stihost.net",
region: "eu-central",
});
await s3.send(new PutObjectCommand({
Bucket: "my-bucket",
Key: "report.pdf",
Body: fileStream,
CacheControl: "public, max-age=86400",
}));Next steps
- → Configure cache rules and TTLs
- → Set up a custom domain with TLS
- → Automate purges with the Purge API