Skip to content
Files SDK
Esc
navigateopen⌘Jpreview
On this page

Akamai Cloud Object Storage

Akamai Cloud Object Storage (formerly Linode) via the S3-compatible API. Endpoint derived from the region/cluster code.

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.

npm install files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
pnpm add files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
yarn add files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
bun add files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner

Usage

import { Files } from "files-sdk";
import { akamai } from "files-sdk/akamai";

const files = new Files({
  adapter: akamai({
    bucket: "uploads",
    region: "us-iad-1", // or "nl-ams-1", "fr-par-1", "us-east-1", ...
    // accessKeyId / secretAccessKey auto-loaded from
    // AKAMAI_ACCESS_KEY_ID / AKAMAI_SECRET_ACCESS_KEY
  }),
});

Akamai Cloud Object Storage (formerly Linode Object Storage) via its S3-compatible API. A thin wrapper around the S3 adapter - endpoint derived from the region/cluster code (us-iad-1, nl-ams-1, fr-par-1, …), virtual-hosted-style addressing, errors relabelled. The endpoint domain linodeobjects.com is unchanged from the Linode era - only the product branding moved to Akamai. Auto-loads from AKAMAI_ACCESS_KEY_ID and AKAMAI_SECRET_ACCESS_KEY. Generate access keys in the Akamai Cloud Manager under Object Storage -> Access Keys.

Options

PropType
bucketstring

Akamai bucket name. The adapter scopes all operations to it.

Typestring
regionstring

Akamai Cloud Object Storage region/cluster code (formerly Linode Object Storage). Examples: `"us-iad-1"` (Washington DC), `"us-mia-1"` (Miami), `"us-ord-1"` (Chicago), `"nl-ams-1"` (Amsterdam), `"fr-par-1"` (Paris), `"gb-lon-1"` (London), `"jp-osa-1"` (Osaka), plus the older `"us-east-1"` / `"eu-central-1"` / `"ap-south-1"` clusters. Drives the endpoint host; there's no env-var fallback. Doubles as the SigV4 region.

Typestring
endpoint?string

Override the Akamai endpoint. When unset, defaults to `https://${region}.linodeobjects.com`. The `linodeobjects.com` domain is unchanged from the Linode era — only the product branding moved to Akamai.

Typestring
accessKeyId?string

Static credentials. Falls back to `AKAMAI_ACCESS_KEY_ID`; required if that env var isn't set.

Typestring
secretAccessKey?string

Static credentials. Falls back to `AKAMAI_SECRET_ACCESS_KEY`; required if that env var isn't set.

Typestring
forcePathStyle?boolean

Use path-style addressing (`/<bucket>/<key>`) rather than virtual-hosted style. Defaults to `false` — virtual-hosted is canonical for Akamai.

Typeboolean
publicBaseUrl?string

Origin used to build URLs from `url()`. When set, `url(key)` returns `${publicBaseUrl}/${key}` and skips signing. For buckets with public ACL, the natural value is `https://${bucket}.${region}.linodeobjects.com`; a custom CNAME fronting the bucket also works. When unset, `url()` falls back to a presigned GetObject (default expiry: 1 hour).

Typestring
defaultUrlExpiresIn?number

Default expiry, in seconds, for the presigned URLs returned by `url()` when `publicBaseUrl` is not set. Defaults to 3600 (1 hour).

Typenumber

Compatibility

Method Status Notes
upload
download
delete
list
search
head
exists
copy
url
signedUploadUrl

Was this page helpful?