---
title: IBM Cloud Object Storage
description: IBM Cloud Object Storage via the S3-compatible API. Auth uses IBM Cloud HMAC credentials, not IAM API keys.
peerDeps:
  - "@aws-sdk/client-s3"
  - "@aws-sdk/s3-presigned-post"
  - "@aws-sdk/s3-request-presigner"
---

## Installation

`@aws-sdk/client-s3`, `@aws-sdk/s3-presigned-post`, and `@aws-sdk/s3-request-presigner` are optional peer dependencies of `files-sdk` - install alongside the SDK so the adapter's imports resolve at runtime.

```package-install
files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
```

## Usage

```ts lineNumbers
import { Files } from "files-sdk";
import { ibmCos } from "files-sdk/ibm-cos";

const files = new Files({
  adapter: ibmCos({
    bucket: "uploads",
    region: "us-south", // or "eu-de", "jp-tok", "au-syd", ...
    // accessKeyId / secretAccessKey auto-loaded from
    // IBM_COS_ACCESS_KEY_ID / IBM_COS_SECRET_ACCESS_KEY (HMAC credentials)
  }),
});
```

IBM Cloud Object Storage via its S3-compatible API. A thin wrapper around the S3 adapter - endpoint derived from the region code (`us-south`, `us-east`, `eu-de`, `eu-gb`, `jp-tok`, `au-syd`, `br-sao`, `ca-tor`, ...), virtual-hosted-style addressing, errors relabelled. Auth uses IBM Cloud's _HMAC_ credentials (not IAM API keys) - tick "Include HMAC Credential" under Advanced options when creating the service credential. Auto-loads from `IBM_COS_ACCESS_KEY_ID` and `IBM_COS_SECRET_ACCESS_KEY`.

## Options

<AutoTypeTable
  path="../../packages/files-sdk/src/ibm-cos/index.ts"
  name="IbmCosAdapterOptions"
/>

## Compatibility

| Method            | Status | Notes |
| ----------------- | :----: | ----- |
| `upload`          |   ✅   |       |
| `download`        |   ✅   |       |
| `delete`          |   ✅   |       |
| `list`            |   ✅   |       |
| `search`          |   ✅   |       |
| `head`            |   ✅   |       |
| `exists`          |   ✅   |       |
| `copy`            |   ✅   |       |
| `url`             |   ✅   |       |
| `signedUploadUrl` |   ✅   |       |
