> For the complete documentation index, see [llms.txt](https://docs.ultihash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ultihash.io/operations/s3-compatible-api.md).

# Use the S3-compatible API

UltiHash offers a powerful, S3-compatible API that allows developers to interact with storage clusters using familiar commands and libraries designed for Amazon S3. The API was implemented in this way to ensure maximum integration flexibility across a wide variety of applications and services in your existing stack - removing the need for complex reconfigurations or middleware solutions.

<figure><img src="/files/ymDrizdXqb90W7KZeh1Q" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

### Achieving S3 compatibility&#x20;

S3 compatibility can be achieved in different ways depending on your environment. For example, Python developers typically use the `boto3` library, which is part of the AWS SDK for Python and provides a straightforward interface for interacting with UltiHash as if it were S3. In contrast, data processing tools like PySpark don’t use `boto3`, instead, they rely on connectors like `s3a`, which is part of the Hadoop ecosystem and optimized for distributed data processing. This distinction is important: `boto3` is great for scripting and general-purpose workloads, while `s3a` is better suited for large-scale data operations in frameworks like Spark.

Generally, you can use any S3-compliant SDK to interact with UltiHash. The AWS SDKs offer extensive support across various programming languages like Python, Java, Node.js, and more. As these SDKs are well-documented and maintained, they are the ideal choice for most developers. For developers looking to explore SDKs across various languages and environments, we highly recommend visiting [AWS Developer Tools](https://aws.amazon.com/products/developer-tools), which offers comprehensive support for integrating with S3-compatible APIs, including UltiHash.
{% endhint %}

## Essential API operations

* [**CreateBucket**](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html): Create new buckets in your UltiHash storage

```bash
aws s3api create-bucket --bucket your-bucket-name --endpoint-url https://your-ultihash-endpoint
```

* [**PutObject**](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html): Upload files to your UltiHash buckets.

```bash
aws s3 cp local-file.txt s3://your-bucket-name/ --endpoint-url https://your-ultihash-endpoint
```

* [**GetObject**](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html): Retrieve files from your UltiHash storage.

```bash
aws s3 cp s3://your-bucket-name/file.txt local-file.txt --endpoint-url https://your-ultihash-endpoint
```

{% hint style="info" %}
You can find premade Python scripts for uploading and downloading data [here](/operations/upload-+-download-data.md).
{% endhint %}

* [**ListObjectsV2**](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html): List the contents of your buckets.

```bash
aws s3api list-objects-v2 --bucket your-bucket-name --endpoint-url https://your-ultihash-endpoint
```

* [**DeleteObject**](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html):&#x20;

Manage your storage by removing one unnecessary object.

```bash
aws s3api delete-object --bucket your-bucket-name --key your-object-key --endpoint-url https://your-ultihash-endpoint
```

Facilitate object deletion operations by removing all objects in one bucket

```bash
aws s3 rm s3://your-bucket-name/ --recursive --endpoint-url https://your-ultihash-endpoint
```

* [**DeleteBucket**](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)**:** Manage your storage by removing unnecessary buckets (buckets should be empty before removal).

```bash
aws s3api delete-bucket --bucket your-bucket-name --endpoint-url https://your-ultihash-endpoint
```

## Full list of API operations

#### S3 Compatibility Layer

* [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
* [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
* [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
* [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
* [CreateBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
* [DeleteBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
* [DeleteBucketPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html)
* [DeleteObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
* [DeleteObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html)
* [GetBucketPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicy.html)
* [GetBucketVersioning](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
* [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
* [HeadBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html)
* [HeadObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)
* [ListBuckets](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
* [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
* [ListObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
* [ListObjectsV2](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
* [ListObjectVersions](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectVersions.html)
* [PutBucketPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketPolicy.html)
* [PutBucketVersioning](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html)
* [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
* [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)

#### IAM Compatibility Layer

* [CreateAccessKey](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html)
* [CreateUser](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html)
* [DeleteAccessKey](https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteAccessKey.html)
* [DeleteUser](https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUser.html)
* [DeleteUserPolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUserPolicy.html)
* [GetUserPolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUserPolicy.html)
* [ListUserPolicies](https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUserPolicies.html)
* [PutUserPolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html)

> For more details on available SDKs and language-specific guides, check out the [AWS SDK hub](https://docs.aws.amazon.com/sdkref/latest/guide/overview.html).
