Cross-account AWS agent deployments

On AWS the account is the strongest boundary you have. How to run agents in their own account and let them act in others through narrow, attributable, short-lived and revocable role assumptions.

  • 8 min read
  • Oct 9, 2026
  • Architecture · cloud

On AWS, the account is the strongest boundary you have. AWS's own guidance on organising environments describes it as an isolation boundary for identity and access management: by default, nothing in one account can reach another. That makes the account the natural place to contain an agent.

The difficulty is that agents are useful precisely because they act across systems, and in a well-organised AWS estate those systems live in different accounts. This note describes how to let agents cross that boundary on purpose: narrowly, attributably, briefly and reversibly. It assumes the principles in Agent permissions and tool boundaries and shows how they map onto AWS.

01

Give the agent its own account

Run the agent's runtime — its compute, model access, logs, memory store and queues — in an account dedicated to agents, separate from the workloads it acts on. The benefits are the usual ones for multiple accounts, sharpened by what agents are:

A walled forge courtyard where a cyan horned-helm agent works, with a tall doorless wall dividing it from a glowing hall.
  • Blast radius. A compromised or misbehaving agent starts with access to nothing outside its own account.
  • Clear ownership and cost. Model usage, compute and storage for agents are visible on their own bill, not buried in a workload's.
  • Separate quotas. A runaway agent cannot exhaust the service limits of a production workload.
  • Separate environments. Development and production agents live in different accounts, so a test agent cannot reach production by mistake.
02

Three topologies

TopologyShapeSuitsWatch for
Hub and spokeAgent runtime in an agent account; a narrow role per tool in each workload accountMost organisations; one place to run and observe agentsThe hub becomes valuable — protect it accordingly
Agent per accountThe agent is deployed into each workload account from a central pipelineStrict isolation requirements; few accountsMore copies to operate, patch and evaluate
Operator and customerA service provider's account runs the agent; the customer's account holds the roleManaged services across organisationsThe confused deputy problem; the customer must be able to revoke alone
Figure 1. Ways to place agents and the accounts they act on.

Hub and spoke is the sensible default. The rest of this note assumes it, with notes where the third topology differs.

Three isometric island clusters: a hub tower with bridges, four identical forges on separate isles, and a bridge whose key a customer holds.
04

Guardrails above the accounts

With AWS Organizations, put limits above every role so that no single policy mistake can undo them. Service control policies set the maximum permissions for principals in member accounts; resource control policies set maximums for resources. Neither grants anything. Useful guardrails for agent roles include:

  • deny all IAM and Organizations changes to any role whose name marks it as an agent role, so no agent can change its own permissions or anyone else's;
  • deny stopping, deleting or modifying CloudTrail trails and the log archive;
  • restrict actions to the regions you actually use;
  • attach a permissions boundary to every role the deployment pipeline creates for agents.

Then use IAM Access Analyzer to find any role that can be assumed from outside your intended zone of trust.

Hephaestus note — I build the roles, but I do not get to approve them. Every trust policy and every tool role goes through the pipeline and a reviewer, and the agent runtime has no path to the pipeline that deploys it. An agent that can edit its own trust policy is not bounded by it.

05

Attribution and audit

When the executor assumes a role in another account, CloudTrail records the AssumeRole call in both the calling account and the account that owns the role, and every subsequent action is logged in the workload account under the role session — with the session name and source identity attached. That is enough to trace any AWS API call back to an agent, a task and, through your own action record, the mission and the person who approved it.

Two details matter in practice. Send an organisation-wide trail to a dedicated log-archive account that no agent role can write to or delete from. And watch failed assumptions from the calling side: AWS does not log denied cross-account role assumptions in the target account, so a probing or misconfigured agent is visible only in its own account's logs.

06

Networking, models and deployment

Run the runtime and the executor in private subnets and reach AWS services through VPC endpoints where they are available; an endpoint policy adds one more boundary on which principals and resources can be used through it. Keep model access and invocation logging in the agent account, so prompts and outputs that contain workload data are governed in one place. And deploy everything — roles, policies, runtime, tools — from a separate deployment pipeline with its own roles, never from the agent itself.

07

Revocation in one step

Know before launch how you will stop an agent. Removing the trust in a workload role stops new sessions; credentials already issued remain valid until they expire. To end those immediately, IAM can revoke a role's active sessions by attaching a policy, AWSRevokeOlderSessions, that denies any request made with credentials issued before that moment. Short sessions make both steps faster and the window smaller.

A wizard pulls a brass lever as a cyan light bridge retracts, its hanging lanterns going dark, and a far gate swings closed.
08

A checklist

  • The agent runs in its own account, separate from production workloads and from development agents.
  • The reasoning runtime cannot assume workload roles; only the executor can, after the policy check.
  • Each tool has its own role per workload account, trusting one named principal.
  • Trust policies require a source identity; third-party trust requires an external ID.
  • Sessions are short, named after the task, tagged with the mission and narrowed by session policies.
  • KMS keys, secrets and buckets the agent uses have deliberate, two-sided grants.
  • Organisation guardrails stop agent roles changing IAM or the audit trail.
  • Logs reach an archive no agent can alter; failed assumptions are monitored at the source.
  • Removing trust and revoking active sessions have both been rehearsed.

Designing this kind of estate is the identity and networking work described on the Guild's Cloud & DevOps page, with Atlas mapping the dependencies and Sentinel watching every production boundary. The principle is the one on the Security & Trust page: isolated credentials, least privilege and revocation, for agents as for everyone else.

From reading to building

Have a workflow where this matters?

Tell us about your use case; the Guild shows how operational intelligence and AI agents could help.