Configure Akamai on Zephyr

We now support Akamai as a cloud provider for Bring Your Own Cloud (BYOC) deployments. Akamai is a cloud platform known for its global content delivery network (CDN), edge computing capabilities, and strong focus on performance and security. Their infrastructure is designed to help organizations build and scale applications closer to end users while maintaining high availability and low latency.

With this integration, you can leverage your existing Akamai infrastructure to run and manage services directly within your own cloud environment, giving you more control, flexibility, and compliance alignment.

Prerequisites

Info
  • A registered Akamai account, contract must include EdgeWorkers (entitled for the Basic Compute resource tier, ID 100 — see Resource tier) and EdgeKV
  • A registered Zephyr account
  • A registered domain
  • EdgeKV enabled for the Akamai account before the first deployment. Zephyr checks this during setup and initializes EdgeKV when Akamai reports the account as uninitialized.
  • Optional: an Akamai Object Storage bucket you own, for files too large for EdgeKV. See Large-asset storage.

Configure and enable Akamai

Log in to the Zephyr Dashboard

After signing in, select your organization.


Locate Akamai under Deployment Integrations

  • Select Settings from the top navigation.
  • In the left sidebar, open Integrations, then Deployment Integrations.
  • Click Add integration, then choose Akamai under AVAILABLE.

Retrieve Credentials and Configure Akamai

Before proceeding, you will need some data from Akamai:

1. API Token

  • Click on Identity and access in the menu
  • Click on Create API client
  • Choose Advanced
  • Configure required permissions and remove the rest:
APIAccess Level
CPcode and Reporting group (cprg)READ-WRITE
Edge Hostnames API (hapi)READ-WRITE
EdgeKVREAD-WRITE
EdgeWorkersREAD-WRITE
Property Manager (PAPI)READ-WRITE
Cloud Access ManagerREAD-WRITE

The Cloud Access Manager permission is needed only if you turn on large-asset storage and let Zephyr create the Cloud Access Manager key. Leave it out otherwise.

  • Copy or download token and add [default] as a header, so token will look like:
  • If your Akamai account uses account switching, include account_key in the same section.
Secure Your Credentials

Keep your API token secure. Never commit credentials to version control or share them publicly.

[default]
client_secret = YOUR_CLIENT_SECRET
host = YOUR_AKAMAI_HOST
access_token = YOUR_ACCESS_TOKEN
client_token = YOUR_CLIENT_TOKEN
# account_key = YOUR_ACCOUNT_KEY

2. Contract id

  • Click on Contracts in the menu
  • Find your contract id

3. Group id

  • Click on Properties in the menu
  • Numeric value in the url is your group id https://control.akamai.com/apps/property-manager/#/groups/<groupId>/properties
  • Use a top-level group that has access to EdgeKV, EdgeWorkers, Property Manager, Edge Hostnames, and CPcode resources for the selected contract.

4. Product id

Find your product here and choose the product id matching your contract. Available products: prd_Security_Failover (Security Failover), prd_API_Accel (API Accelerator), prd_Site_Accel (Site Accelerator). For this delivery-property integration, use prd_Site_Accel.

5. Resource tier

Zephyr provisions your EdgeWorker on the Basic Compute resource tier (resourceTierId: 100). Confirm this tier is entitled on the contract you selected above before starting:

  • Akamai Control Center → Account Admin → Contracts → open your contract → search the product list for EdgeWorkers and check which tier(s) are listed.
  • Or, with the EdgeWorkers CLI installed, run akamai edgeworkers list-restiers --contractId <your-contract-id> and confirm resourceTierId: 100 (Basic Compute) is in the response.

If your contract is only entitled for Dynamic Compute or Enterprise Compute, EdgeWorker creation fails with an Akamai 403 Forbidden error (errorCode: EW0401, detail: Permission Invalid), even when your API token has the correct EdgeWorkers permission.

6. Object Storage bucket and keys (optional)

Only needed for large-asset storage. Skip this step to keep every file in EdgeKV.

  • Create a new Akamai Object Storage bucket on a standard (E2 or E3) endpoint and use it only for Zephyr. Its hostname has the form <bucket>.<region>.linodeobjects.com, for example my-bucket.us-iad-10.linodeobjects.com.
  • Create two access keys limited to this bucket:
    • an upload key with read/write access. The Zephyr worker signs uploads with it.
    • a read-only key. The Akamai edge reads the bucket with it, through a Cloud Access Manager key.
  • Decide who creates the Cloud Access Manager key:
    • Zephyr creates it from the read-only key. Your API client needs the Cloud Access Manager READ-WRITE permission (see API Token), and you give Zephyr the read-only key.
    • You create it in Akamai Control Center under Cloud Access Manager: create an access key from the read-only key with the AWS SigV4 authentication method on the Standard TLS network, wait until its version is active (about 10 minutes), and copy the version GUID. Your API client needs no Cloud Access Manager permission, and the read-only key is never given to Zephyr.

Configuration Inputs

Details for each input after clicking Add Integration under Akamai:

Integration Name
A unique name within your organization, used as a slug.
Integration Display Name
The name of the integration shown on the dashboard.
API Token

Obtainable from Akamai. See instructions for creating your API token.

Domain
Your domain.
Akamai contract id

Obtainable from Akamai. See instructions for getting your contract id.

Akamai group id

Obtainable from Akamai. See instructions for getting your group id.

Akamai product id

Obtainable from Akamai. See instructions for getting your product id.

Akamai account key

Optional. Required only when your API client authenticates through an Akamai account-switching context.

Large assets (optional)

Fields for large-asset storage. Leave Bucket hostname empty to keep every file in EdgeKV. When you set it, the other fields of this section are required. See Object Storage bucket and keys for creating the bucket and keys.

Bucket hostname

Your bucket's hostname, for example my-bucket.us-iad-10.linodeobjects.com. Only Akamai Object Storage bucket hostnames are accepted. It cannot be changed once saved.

Region

Optional. Derived from the hostname (us-iad-10 in the example above) when left empty. It cannot be changed once saved.

Cloud Access Manager key

Who creates the key the Akamai edge reads the bucket with. Choose Zephyr creates it from a read-only key (API client needs Cloud Access Manager READ-WRITE) if your API client can have the Cloud Access Manager permission, and enter the read-only key below. Choose I created it in Control Center (enter its version GUID) if your API client must not have that permission, and enter the version GUID of the key you created.

Read-only access key ID / Read-only secret key

Shown when Zephyr creates the Cloud Access Manager key. The read-only key of your bucket. It must be a different key from the upload key, and Zephyr rejects a key that can write to the bucket.

Access key version GUID

Shown when you created the Cloud Access Manager key yourself. The GUID of an active version of that key, for example 00000000-0000-0000-0000-000000000000.

Upload access key ID / Upload secret key

The read/write key limited to your bucket. It is saved as a hidden variable on the Akamai property; see Security notes.

Set Integration as Default

When set as default, all Zephyr deployments will use this integration until a new one (default integration) is set. Deployment using integration won't work until Akamai worker and property become activated.

Validate domain and setup DNS

  • Click on Properties in the menu

  • Click on your property

  • Click on active version

  • Go to section Property hostnames

  • Click on ... in Actions column near any hostname, click Validate certificate domain and copy CNAME Record value

  • Go to your domain provider (e.g., GoDaddy)

  • Add some CNAME records

    SubdomainTypeValue
    _acme-challenge.ze.yourdomain.comCNAME< value from verification record >
    ze.yourdomain.comCNAMEze.yourdomain.com.edgesuite.net.
    *.ze.yourdomain.comCNAMEze.yourdomain.com.edgesuite.net.

Wait until worker and property become activated

It may take up to 30 minutes.

Retry after EdgeKV initialization

If setup failed because EdgeKV was not initialized, verify that the API client has EdgeKV READ-WRITE permission and then retry the same integration from Zephyr. Retry reuses the saved Akamai configuration and continues setup after the EdgeKV preflight completes.

Retry after a resource tier error

If setup failed with an Akamai 403 Forbidden error (errorCode: EW0401, detail: Permission Invalid) while creating the EdgeWorker, this usually means the contract isn't entitled for the Basic Compute resource tier Zephyr requests. Verify entitlement with your Akamai account team or the Resource tier check above, then retry the same integration from Zephyr. Retry reuses the saved Akamai configuration.

Retry after a Cloud Access Manager key error

If you turned on large-asset storage and Zephyr creates the Cloud Access Manager key:

  • "The Akamai API client has no Cloud Access Manager access": grant the API client Cloud Access Manager READ-WRITE, or create the key yourself and switch Cloud Access Manager key to I created it in Control Center (enter its version GUID). Then retry.
  • "The Cloud Access Manager key is still activating": a new key takes about 10 minutes to become active. Save the integration again, or retry it, in a few minutes. Zephyr finds the key it already created and continues.
  • Property activation fails because the access key version is not active: Akamai can refuse a new key version for a few minutes after reporting it as active. When adding storage to an existing integration, save it again a few minutes later. When creating an integration, contact us on Discord before retrying.

What Will Be Created on Your Akamai Account?

When Akamai is added as your provider on Zephyr, these properties will be created on your Akamai account:

1. EdgeKV Namespace

  • ze-yourdomain-com

2. EdgeKV access token

  • ekv-token-ze-yourdomain-com

3. Workers

  • ze.yourdomain.com (for uploading and serving assets)

4. Property

  • ze.yourdomain.com

5. Cloud Access Manager access key

Only with large-asset storage, when Zephyr creates the Cloud Access Manager key:

  • ze-object-storage-ze-yourdomain-com, created from your read-only bucket key

When you replace the read-only key, Zephyr adds a version to this access key. A key holds at most two versions, so Zephyr deletes the older version the property no longer uses.

6. Large-asset storage settings on the property

Only with large-asset storage, on the ze.yourdomain.com property:

  • Property variables PMUSER_ZE_OS_HOSTNAME and PMUSER_ZE_OS_REGION (your bucket), and the hidden variables PMUSER_ZE_OS_UPLOAD_KEY_ID and PMUSER_ZE_OS_UPLOAD_SECRET (your upload key)
  • A Stored objects rule (with a Stored object errors child rule) that serves paths whose last segment starts with __ze_o~ from your bucket, signed with the Cloud Access Manager key. The EdgeWorker, applied by the Route traffic rule, does not run on these paths.

Large-asset storage

Akamai EdgeKV holds at most 999,999 bytes per value, and the Zephyr worker stores binary files there as text in which every byte from 0x80 up takes two bytes. A binary file of about 500 KB can already be too large for EdgeKV. Large-asset storage keeps such files in an Akamai Object Storage bucket you own instead.

How it works

  • Files over 500 KB (500,000 bytes) are uploaded to your bucket during the build. Smaller files stay in EdgeKV.
  • These files are never stored in the bucket and always go to EdgeKV: HTML files, documents the worker would serve as HTML or XML (such as SVG and XML files), zephyr-manifest.json, and .gz files.
  • Images, fonts, audio, video, archives and PDFs are stored as they are. Other files are stored gzip-compressed.
  • A request for a stored file is answered with a 307 redirect to a path in the same directory, __ze_o~<application>~<hash>, which the edge serves straight from the bucket. Browsers follow it; other HTTP clients must follow redirects too.
  • The edge caches a stored object for 7 days, then checks it against the bucket again. Error responses for these paths are not cached by clients.
  • Without a bucket, or with a worker or build plugin that does not support large-asset storage, every file goes to EdgeKV as before.

To turn it on when you add the integration, fill in the Large assets (optional) section of the form (see Configuration Inputs) after preparing the bucket and keys.

Before creating anything, Zephyr checks the keys against the bucket: it writes and deletes a small test object under __ze_probe/ with the upload key and, when Zephyr creates the Cloud Access Manager key, checks that the read-only key can read the bucket but cannot write to it.

Add or change storage on an existing integration

Open the integration's edit screen (see Updating Deployment Integrations) and fill in or change the Large assets (optional) section.

  • Worker version: the integration must run a worker version that supports large-asset storage. If it does not, saving fails with "Akamai worker version … does not support large-asset storage". Update the worker first with Update Version, as described in Updating Deployment Integrations.
  • Bucket: Bucket hostname and Region cannot be changed once set, because deployed versions keep their large files in that bucket.
  • Keys: stored keys are never shown again. Leave a key's ID and secret empty to keep it, or enter both to replace it. You can also switch the Cloud Access Manager key mode.
  • Save storage changes on their own: an edit that changes storage together with the domain, contract, group, product or delimiter is rejected.
  • Saving puts the new settings on a new property version and activates it, which takes a few minutes. The EdgeWorker is not redeployed. If the settings change nothing on the property, no new version is activated.
  • After replacing the upload key, revoke the old one in Object Storage (see Security notes).

If the integration's setup never finished, saving retries the setup with the storage settings included.

Security notes

Upload key visibility

The upload key is saved on your Akamai property as the hidden property variables PMUSER_ZE_OS_UPLOAD_KEY_ID and PMUSER_ZE_OS_UPLOAD_SECRET. Hidden only keeps the values out of Akamai's debug headers: anyone who can view the property can read the key, in every property version that carried it.

  • Limit the upload key to the Zephyr bucket.
  • After replacing the upload key, revoke the old key in Object Storage. Earlier property versions still contain it.
  • Use a bucket only for Zephyr. The property serves objects named <application>/<hash> publicly, on every hostname of the property.
  • Give the edge a read-only key. When Zephyr creates the Cloud Access Manager key, it refuses a read-only key that can write to the bucket, or that is the same as the upload key.
  • Zephyr never returns the stored keys; the edit screen shows them as hidden.

Limits

  • Zephyr never deletes objects from your bucket, including objects of old or deleted versions, and each build uploads its large files again. Objects that a deployed version still uses must stay in the bucket.
  • A file that cannot go to the bucket (HTML, SVG, XML, zephyr-manifest.json, .gz) and is too large for EdgeKV fails the deploy with ZE20017, naming the file and its size.
  • Large files are stored only in the bucket of the integration the build uploads to. Environments that deploy to another Akamai integration receive every file through EdgeKV, so a file too large for EdgeKV fails the deploy there.

Clean Uninstall and Reset

Warning
  • Zephyr Cloud does not manage deletion of API tokens or any Akamai account properties, and never deletes your Object Storage bucket, its objects or its keys.
  • Assets and information on your Akamai account are immutable by default. During a clean uninstall, previously deployed assets and information are unrecoverable.

To delete an existing Akamai integration, follow these steps:

Deleting property

  1. Remove CNAME records which have been added here
  2. Click on Properties in the menu
  3. Click on your property
  4. Click on three ... in the Actions column in the active version line
  5. Choose Deactivate Production
  6. Wait until property become deactivated
  7. Go back to properties list
  8. Click on three ... in the Actions column in the your property line
  9. Choose Delete Property

Deleting worker

  1. Click on EdgeWorkers in the menu
  2. Click on your worker
  3. Click on three ... in the Actions column in the active version line
  4. Choose Deactivate version
  5. Wait until version become deactivated
  6. Go back to workers list
  7. Click on three ... in the Actions column in the your worker line
  8. Choose Delete EdgeWorker ID

Remove edge hostname

  1. Click on Edge Hostnames in the menu
  2. Click on three ... in the Actions column in the active version line
  3. Choose Delete Edge Hostname

Remove EdgeKV namespace

Can be done only with Akamai API.

const EdgeGrid = require('akamai-edgegrid');

const { homedir } = require('node:os');
const { promisify } = require('node:util');

const edgercPath = homedir() + '/.edgerc';
const edgercSection = 'default';
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection,
});

const namespaceId = process.env.NAMESPACE;
const network = process.env.NETWORK || 'production'; // staging or production

eg.auth({
  path: `/edgekv/v1/networks/${network}/namespaces/${namespaceId}`,
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  body: {},
});

const send = promisify(eg.send.bind(eg));
send()
  .then(({ data }) => {
    console.log('Namespace deleting result', data);
  })
  .catch((error) => {
    console.error('Namespace deleting error', error);
    process.exit(1);
  });

Revoke EdgeKV access token

Can be done with Akamai CLI or Akamai API.

const EdgeGrid = require('akamai-edgegrid');

const { homedir } = require('node:os');
const { promisify } = require('node:util');

const edgercPath = homedir() + '/.edgerc';
const edgercSection = 'default';
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection,
});

const tokenName = process.env.TOKEN_NAME;

eg.auth({
  path: `/edgekv/v1/tokens/${tokenName}`,
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  body: {},
});

const send = promisify(eg.send.bind(eg));
send()
  .then(({ data }) => {
    console.log('Token revoking result', data);
  })
  .catch((error) => {
    console.error('Token revoking error', error);
    process.exit(1);
  });

Remove large-asset storage resources

If you used large-asset storage, after deleting the property:

  1. In Akamai Control Center, open Cloud Access Manager and delete the access key ze-object-storage-ze-yourdomain-com (or the key you created yourself).
  2. In Object Storage, revoke the upload key and the read-only key.
  3. Delete the bucket's objects, then the bucket. Zephyr never deletes them.