Nexqloud
Storage

S3 API Usage

Connect to Object Storage using boto3 and aws-cli

S3 API Usage

NexQloud Object Storage is fully S3-compatible. Use standard tools like boto3 (Python) and aws-cli to interact with your buckets programmatically.

Connection Details

PropertyValue
Endpointhttps://storage.dcp.nexqloud.net
Regionauto
SignatureAWS Signature V4
Path StyleRequired (s3ForcePathStyle: true)

Supported Operations

OperationSupported
ListBuckets
ListObjects
GetObject
PutObject
DeleteObject
HeadObject
HeadBucket
CopyObject
CreateMultipartUpload
UploadPart
CompleteMultipartUpload
AbortMultipartUpload
ListParts
CreateBucket and DeleteBucket are managed exclusively through the NexQloud dashboard and are not available via the S3 API.

Using boto3 (Python)

Installation

pip install boto3

Configure Client

import boto3

s3 = boto3.client(
    's3',
    endpoint_url='https://storage.dcp.nexqloud.net',
    aws_access_key_id='NQAK_YOUR_ACCESS_KEY_ID',
    aws_secret_access_key='YOUR_SECRET_ACCESS_KEY',
    region_name='auto'
)

List Buckets

response = s3.list_buckets()
for bucket in response['Buckets']:
    print(bucket['Name'])

Upload an Object

# Upload from file
s3.upload_file('local-file.txt', 'my-bucket', 'remote-file.txt')

# Upload from bytes
s3.put_object(
    Bucket='my-bucket',
    Key='data.json',
    Body=b'{"hello": "world"}',
    ContentType='application/json'
)

Download an Object

# Download to file
s3.download_file('my-bucket', 'remote-file.txt', 'local-file.txt')

# Read into memory
response = s3.get_object(Bucket='my-bucket', Key='data.json')
content = response['Body'].read()

List Objects

response = s3.list_objects_v2(Bucket='my-bucket')
for obj in response.get('Contents', []):
    print(f"{obj['Key']} ({obj['Size']} bytes)")

Delete an Object

s3.delete_object(Bucket='my-bucket', Key='remote-file.txt')

Multipart Upload (Large Files)

For files larger than 5 GB, use multipart upload:

from boto3.s3.transfer import TransferConfig

# Configure multipart threshold (5 GB)
config = TransferConfig(
    multipart_threshold=5 * 1024 * 1024 * 1024,
    multipart_chunksize=100 * 1024 * 1024  # 100 MB chunks
)

s3.upload_file(
    'large-file.bin',
    'my-bucket',
    'large-file.bin',
    Config=config
)

Generate a Presigned URL

url = s3.generate_presigned_url(
    'get_object',
    Params={'Bucket': 'my-bucket', 'Key': 'file.txt'},
    ExpiresIn=3600  # URL valid for 1 hour
)
print(url)

Using aws-cli

Installation

# macOS
brew install awscli

# Linux
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install

# pip
pip install awscli

Configure Profile

Create a named profile for NexQloud:

aws configure --profile nexqloud

Enter the following when prompted:

AWS Access Key ID: NQAK_YOUR_ACCESS_KEY_ID
AWS Secret Access Key: YOUR_SECRET_ACCESS_KEY
Default region name: auto
Default output format: json

List Buckets

aws s3 ls --endpoint-url https://storage.dcp.nexqloud.net --profile nexqloud

Upload a File

aws s3 cp local-file.txt s3://my-bucket/remote-file.txt \
    --endpoint-url https://storage.dcp.nexqloud.net \
    --profile nexqloud

Download a File

aws s3 cp s3://my-bucket/remote-file.txt local-file.txt \
    --endpoint-url https://storage.dcp.nexqloud.net \
    --profile nexqloud

List Objects in a Bucket

aws s3 ls s3://my-bucket/ \
    --endpoint-url https://storage.dcp.nexqloud.net \
    --profile nexqloud

Sync a Directory

aws s3 sync ./local-folder s3://my-bucket/prefix/ \
    --endpoint-url https://storage.dcp.nexqloud.net \
    --profile nexqloud

Delete an Object

aws s3 rm s3://my-bucket/remote-file.txt \
    --endpoint-url https://storage.dcp.nexqloud.net \
    --profile nexqloud

Generate a Presigned URL

aws s3 presign s3://my-bucket/file.txt \
    --expires-in 3600 \
    --endpoint-url https://storage.dcp.nexqloud.net \
    --profile nexqloud

Error Handling

Common error responses:

HTTP CodeErrorCause
403SignatureDoesNotMatchInvalid secret key or incorrect signing
403AccessDeniedKey does not have permission for this bucket
404NoSuchBucketBucket does not exist or is not accessible
404NoSuchKeyObject key does not exist
400InvalidBucketNameBucket name violates naming rules

Tips

  • Always use endpoint_url / --endpoint-url — without it, requests go to AWS instead of NexQloud
  • Set region_name='auto' — NexQloud uses a single global region
  • Use environment variables for credentials in production:
export AWS_ACCESS_KEY_ID=NQAK_YOUR_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
export AWS_ENDPOINT_URL=https://storage.dcp.nexqloud.net

Next Steps