Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

Object storage

AWS CLI custom S3 endpoint: profile, region and bucket commands

Published August 2026 · 5 min read · Updated 2026-09-05

Use --endpoint-url to send an AWS CLI S3 request to your storage provider. Keep the credentials in a separate profile and pass the provider's signing region. Start by listing the assigned bucket; you do not need to upload or delete files to check basic access.

1. Create a named profile

Install AWS CLI v2 using its official instructions, then create a profile for the storage service. Enter the provider-issued access key and secret when prompted. You do not need an AWS account to use a compatible provider's keys.

The commands below use the name dotmoose and path-style addressing. This changes that named CLI profile only. Keep any existing AWS production profile separate. Do not paste secret keys into a support message or commit the credentials file.

aws configure --profile dotmoose
aws configure set s3.addressing_style path --profile dotmoose

Install AWS CLI

2. Copy the service connection details

Set the HTTPS endpoint, signing region and bucket exactly as supplied by your provider. These are placeholders, not working DotMoose service credentials. The bucket name goes in the bucket argument, not on the end of the endpoint.

The shell syntax shown is for macOS and Linux. Windows users can set the same values in PowerShell and pass them to the equivalent AWS CLI command.

# Replace these with the values supplied by your storage provider.
export S3_ENDPOINT_URL='https://storage.example.com'
export S3_REGION='provider-region'
export S3_BUCKET='your-assigned-bucket'

3. List a few objects without changing the bucket

Run this in a shell after setting the variables. The checks stop an empty endpoint or bucket from silently becoming a request to an unintended account. The command limits the page size and total result to five objects. It prints the number returned, not the total bucket size.

A result of zero is normal for an empty bucket. Listing the assigned bucket may work even when an account-wide list of all buckets is forbidden. No files are uploaded, deleted or made public.

: "${S3_ENDPOINT_URL:?Set the HTTPS storage endpoint}"
: "${S3_REGION:?Set the signing region}"
: "${S3_BUCKET:?Set the assigned bucket}"
case "$S3_ENDPOINT_URL" in
  https://*) ;;
  *) printf '%s\n' 'Use an HTTPS endpoint.' >&2; exit 1 ;;
esac

aws --profile dotmoose \
  --endpoint-url "$S3_ENDPOINT_URL" \
  --region "$S3_REGION" \
  s3api list-objects-v2 \
  --bucket "$S3_BUCKET" --page-size 5 --max-items 5 \
  --query 'length(Contents || `[]`)' --output json --no-cli-pager

AWS CLI endpoint options and precedence

4. Fix common connection errors

For SignatureDoesNotMatch, check the profile keys, region, endpoint and system clock. If a proxy rewrites the signed host or path, fix the proxy configuration.

AccessDenied can be a bucket-permission issue, not a bad password. A missing bucket or redirect often points to the wrong name, region or endpoint. TLS errors need a valid hostname and certificate chain; do not disable certificate validation as a permanent fix.

Make --endpoint-url and --profile part of saved commands. Without an explicit endpoint, other CLI settings or AWS defaults may send the request elsewhere.

5. Move on to your actual workload

A listing is only a connection check. Use a dedicated test prefix to verify small uploads, downloads and byte comparisons before starting a migration. Test multipart transfers and restores separately if a backup job depends on them. Avoid broad recursive deletes as a troubleshooting step.

For DotMoose, use the connection details from your Object Storage service and review its capacity and supported operations. The command-line example does not claim compatibility with every feature surrounding Amazon S3.

Compare DotMoose Object Storage plans | Use the endpoint from Python with boto3 | Plan a restore test

Next step

Use --endpoint-url with AWS CLI and S3-compatible storage. Set a separate profile, check a bucket safely, and troubleshoot region, signature and access errors.

Explore DotMoose Object Storage

Keep reading

Related guides.

boto3 S3-compatible storage: custom endpoint, put_object and connection tests

Connect boto3 to S3-compatible storage with endpoint_url. Start with a read-only list, then optionally verify put_object with one isolated write/read/delete round trip.

Read the guide

S3 multipart upload explained: part size, retries, checksums and cleanup

Learn how S3 multipart upload works: numbered parts, AWS part-size limits, parallel retries, completion, checksums and cleanup of abandoned uploads.

Read the guide

S3 presigned URLs explained: temporary access without sharing keys

Learn how S3 presigned URLs authorize a specific operation for a limited time, where they help, what they expose and how to use them safely.

Read the guide

More object storage guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move