Skip to main content
Use boto3 for Python or AWS SDK for JavaScript v3 to call compatible S3 operations. The examples below run on your computer or an application server. Keep secrets out of browser code.

Before you start

Create and save an access key. Set these environment variables in the process that will run your code: These are variable names used by the examples, not credentials issued separately by Hivenet. Supply their values through your environment or secrets manager. For self-service storage, writes require a positive organization credit balance. At a zero or negative balance, your organization’s configuration determines whether storage becomes Read only or Disabled. Object listing and downloads remain available in Read only mode and are blocked in Disabled mode. See When credits run out.

Python with boto3

Install boto3:
Create the client and list buckets:
Keep the client definition above when using the following examples.

List all objects in a bucket

Replace YOUR_BUCKET:
The paginator follows continuation tokens, so it can read beyond the first response.

Upload and download a file

Create a bucket in the console and a small local hello.txt file first:
upload_file manages multipart uploads when needed. Choose an object key and a local download name that do not contain data you need to keep. For client behavior, see the boto3 configuration guide and file upload guide.

JavaScript with Node.js

Install the client in your Node.js project:
Save this example as hivenet-list.mjs:
Run it:

List objects with pagination

To list a bucket instead, replace the contents of the try block above with:

Upload a small object

For a small test upload, replace the contents of the same try block with:
This replaces hello.txt if it already exists. PutObjectCommand sends one request. It does not automatically turn a large file into a multipart upload. For managed large-file transfers, use a multipart transfer helper or the AWS CLI and rclone guides. See the AWS SDK for JavaScript S3 examples for request syntax, subject to Hivenet’s supported operation list.

If authentication fails

Check all four settings together: the Hivenet endpoint, Europe signing region, path style, and the matching credential pair. Do not replace Europe with the display label EU or an AWS region name. See Troubleshooting.