A secrets manager is usually sold on safety. On 4 December 2026 DigitalOcean put a number on it as well: its Secrets Manager general-availability post publishes a rate per stored secret and a rate per retrieval. The second rate is the interesting one, because how often your code retrieves a secret is a decision you make in a few lines of code.
This article works through that published price, shows what "fetch the key on every call" costs at different volumes, and gives a small pattern that keeps the count low without leaving you stuck on a stale key. The arithmetic and the code are ours. The rates are DigitalOcean's, for DigitalOcean's product, and its post says they can change.
What the post actually prices
According to the post, the service is generally available only to eligible customers in supported regions; it does not list the regions, so check before you plan around it. The pricing has two meters:
- Storage. One secret kept for a full month is one secret-month, prorated for part of a month. The post says the service currently includes a monthly allowance of 25 secret-month equivalents per billing account, and charges $0.40 for each one above that.
- Retrievals. The allowance currently includes 100,000 successful retrieval requests a month per billing account, and the rate above it is $0.05 per 10,000 requests. The post adds that failed requests are currently not billed, and that versioning and management operations currently carry no separate charge.
The allowance is per billing account, across projects and regions, so every agent and app on the account draws from the same 100,000.
DigitalOcean gives its own example: 100 secrets stored for a full month and 500,000 successful retrievals come to $32, which is $30 for storage above the allowance and $2 for retrievals. It labels the example illustrative, with prices in U.S. dollars before tax.
What "on every call" costs
The post's advice to developers is to "retrieve a secret once and reuse it, rather than fetching it on every call". Here is the same rate applied to an agent that does the opposite, using a 30-day month and counting only retrievals above the 100,000 allowance:
- One call a minute: 43,200 retrievals. Inside the allowance, so nothing extra.
- One call a second: 2,592,000 retrievals, about $12.46 a month.
- Ten calls a second: 25,920,000 retrievals, about $129.10 a month.
- One hundred calls a second: 259,200,000 retrievals, about $1,295.50 a month.
Two things follow. At low volume the retrieval meter is small, and in DigitalOcean's own example storage is fifteen times the retrieval charge. At high volume the same habit becomes a real line on the bill, and it scales with traffic rather than with the number of secrets you have.
Money is also the smaller cost. A fetch on every call puts a network round trip to the secrets service in front of every request your agent makes, and makes that service's availability part of yours. Those are our points, not the post's, and they apply to any secrets service with a network API.
Fetch once, reuse, refetch on refusal
Caching a secret in the process has one honest drawback: after a rotation, a cached copy can be out of date. The pattern below handles that by refetching in two cases only: the cached value is older than a limit you choose, or the service you called refused it.
// Fetch a secret once, reuse it, and fetch again only when it is old or was refused.
// fetchSecret(name) is whatever client your secrets service gives you.
const TTL_MS = 15 * 60 * 1000;
const cache = new Map(); // name -> { value, at }
async function getSecret(name, fetchSecret, { force = false } = {}) {
const hit = cache.get(name);
if (!force && hit && Date.now() - hit.at < TTL_MS) return hit.value;
const value = await fetchSecret(name);
cache.set(name, { value, at: Date.now() });
return value;
}
// Use the cached value; if the service on the other end refuses it, fetch a fresh one and retry once.
async function withSecret(name, fetchSecret, call) {
try {
return await call(await getSecret(name, fetchSecret));
} catch (err) {
if (err.status !== 401 && err.status !== 403) throw err;
return call(await getSecret(name, fetchSecret, { force: true }));
}
}
module.exports = { getSecret, withSecret };
We ran this against a stub: 1,000 calls made one fetch; after the value was changed, the next call was refused, fetched once more and succeeded; the following 1,000 calls made no further fetch. With a 15-minute limit, one process retrieves each secret about 2,880 times in a 30-day month if nothing is ever refused, however many calls it serves.
Two cautions. Each process keeps its own copy, so ten workers make ten times the retrievals; that is still thousands, not millions. And retrying on a refusal only helps if the new value is already in the store when the old one stops working, which is a matter of how you rotate.
What the price does not buy
The post is direct about the limits of the product, and they are worth repeating because they are true of the whole category:
- It governs retrieval, not use. The post says the service decides who can retrieve a secret, and that once an agent has the value it is in the agent's process. We covered that half of the problem in keeping API keys out of your AI agent with a credential broker.
- It stores versions; it does not rotate at the issuer. According to the post, the five most recent versions are kept so you can revert, and the service does not change the credential in the system that issued it. Rotation is still two steps, and the order matters for the retry above.
- The audit trail is a design statement. The post says audit logs are designed to record who requested a secret and whether the request succeeded. Read "designed to" as the vendor wrote it.
- The command line still leaks. The post warns that a real credential passed as a command-line argument can end up in shell history. That is true on every host: pass secrets through a file or standard input instead.
One detail is specific to DigitalOcean's Kubernetes service: the post says reading a secret from a mounted file there adds no requests, while retrievals made by its Kubernetes integration, including its checks for new versions when automatic rotation is on, count toward the same allowance and rate. If you use that integration, the check interval is your retrieval count.
The short version
When a secrets service meters retrievals, the bill is decided where your code asks for the key. Ask once per process, keep the value for minutes, ask again when it is refused, and the retrieval meter stays inside the included allowance for most small systems. Then spend the attention on the parts no price list covers: what the agent can do with the key once it has it, and how you rotate it at the source.
Source, read 5 December 2026: DigitalOcean, "DigitalOcean Secrets Manager is now generally available: Manage credentials for your agents and applications in one place" (published 4 December 2026). Rates, allowances and the $32 example are DigitalOcean's, described by it as subject to change. The per-volume figures and the code are ours. This article makes no statement about how any other platform, including ours, stores or handles secrets.