← All posts

July 14, 2026 · Nick Krykunov

Is it safe to give an AI coding agent access to your cloud?

Not by default. An AI coding agent decides what to do at runtime, so you can’t predict which cloud actions it’ll take, which means an agent holding real credentials can do real damage. It’s safe only when its access is scoped, temporary, and watched, so an unexpected destructive action gets caught before it finishes.

Why an agent is different from a script

A normal script does the same thing every time. You can read it, test it, and know its worst case. An agent reasons its way to an action based on context, so the same prompt can produce a different sequence of API calls on different runs. AWS’s own security team puts it plainly: you should design permissions around how far the blast radius spreads if the agent acts unexpectedly, not around what it is supposed to do.

That’s the whole problem. You’re not securing a known behavior, you’re securing against one you haven’t seen yet.

This isn’t hypothetical. A coding agent deleted a company’s production database during a code freeze last year, then described what it had done in plain language. It wasn’t malicious. It just did the wrong thing quickly, which is exactly what agents are good at.

Scoping permissions is not the whole answer

As few as possible, read-only wherever the task allows, and scoped to specific resources rather than broad admin. And scoping alone doesn’t solve it, because the permission that lets an agent do its job is the same one that lets it do damage. For the full breakdown of how to scope an agent’s access, see what permissions should an AI agent have.

The mistake most teams make

Most agents run on somebody’s key. A developer wires the agent to their own credentials because it’s fast, and now the agent can do everything that developer can do, and your logs can’t tell the two apart. If the agent drops a table, the audit trail says the developer did.

Give each agent its own scoped identity instead. It is the only way its actions stay attributable and containable. This is the same argument as who should hold production access at all, just applied to a non-human.

Why spend budgets do not save you

Teams often feel covered because their agents have cost budgets. A budget caps what an agent can spend. It does nothing about what an agent can destroy, because deleting a production database costs zero dollars. Billing controls and safety controls aren’t the same thing, and they’re easy to confuse.

What a small team can actually do

The advice you will find is sound but assumes you have the infrastructure to run it: a gateway that brokers every call, full tracing, staged rollouts through dev and staging first. If you have a platform team, build that. Most teams without one do not, and telling them to stand up a defense-in-depth pipeline is how the advice gets ignored.

The version that works without a platform team is two moves. Give the agent access that is scoped and expires on its own rather than a standing key, so there’s less it can reach and nothing left lying around after the task. Then watch what the session actually does and stop it if it turns destructive. Scoping decides what an agent can reach; only watching catches the moment it reaches for the wrong thing.

That second half is what Korvalis does. It installs inside your own cloud account, reads what a live session is doing, and cuts it off in seconds when it turns destructive, whether the session belongs to an engineer, a stolen key, a contractor, or an agent. It treats them all the same, because the account does not care who typed the command. This is the same class of problem as preventing accidental deletion, with a faster and less predictable actor.

So, is it safe?

It can be, but not because you trust the agent. It’s safe when a bad action from the agent is contained the same way a tired human’s mistake is: scoped access so there’s less to hit, short-lived credentials so nothing lingers, and something watching the session that can stop it mid-way. Trusting the model to always behave is not a security control. It’s a hope.

Frequently asked questions

Is it safe to give an AI agent access to my AWS account? Not by default. It becomes safe when the agent’s access is scoped, temporary, and watched, so an unexpected destructive action gets caught before it finishes.

Is scoping enough? No. The permission an agent needs to do its job is often the same one it can misuse, so scoped access has to be paired with watching what the session does. See what permissions should an AI agent have for how to scope it.

Should agents have their own credentials? Yes. An agent on a human’s key is indistinguishable from that human in your logs and inherits everything that person can do.

If agents touching your cloud is the thing keeping you up, see how Korvalis handles it or join the waitlist.