Nobody Offboards an AI Agent
Your access review covers every employee who left last quarter. It almost certainly does not cover the Bedrock agent someone built in March and forgot about.
When an engineer resigns, a process starts. HR closes the ticket, IT revokes the SSO account, the manager signs a form, and three months later an auditor asks for evidence that all of it happened within the SLA. That process exists because someone was once burned by a former employee who still had production access.
No equivalent process exists for the agent that engineer left behind.
I spent an internship on the assurance side of this — testing IT general controls, walking through access management, tying user listings back to HR data. The control framework I was testing against was built for people. It assumes an identity has a joiner, a mover, and a leaver. Non-human identities have always strained that assumption; service accounts and CI/CD roles have been the awkward footnote in access reviews for a decade. AI agents break it outright, because they are the first category of non-human identity that gets created by someone who is not thinking about identity at all.
Here is how I would test them.
Test 1: Completeness of the population
You cannot audit what you cannot enumerate, and every access-management test starts with the same question — is this list complete? For human users, completeness comes from tying the identity provider back to the HR system. Two independent sources, one reconciliation.
For agents, there is no HR system. So the first thing to establish is where the population comes from.
In practice you are looking at IAM roles, not at an "agents" list, because the security boundary is the role, not the model. Amazon Bedrock Agents require a service role at creation, and if the builder does not supply one, the console will create one for them. Bedrock AgentCore Runtime works the same way — an execution role with a trust policy naming
bedrock-agentcore.amazonaws.com , which the starter toolkit will generate automatically if you do not specify an existing role.That auto-creation convenience is exactly what makes the population hard to bound. The role exists because a wizard made it, not because anyone requested it.
What I would ask for:
- A listing of all IAM roles whose trust policy names a Bedrock or agent-related service principal, as of a stated date
- A listing of Lambda execution roles reachable from those agents' action groups
- A listing of knowledge base service roles, which are separate identities from the agent role itself
- The reconciliation between those listings and whatever internal register the organisation claims to maintain
What tells you the answer is "no, it's not complete": the third listing has entries the register does not, and nobody can say who owns them. That gap is the finding. Everything after this test is downstream of it.
Test 2: Authorization — who approved this permission set?
For a human, this test is mechanical. Pick a sample of users, request the access request ticket, check that an appropriate approver signed off before the access was granted, check that the approver was not the requester.
For an agent, ask the same question about the policy attached to its role, and watch what happens.
The honest answer in most environments is that nobody approved it. The permission set accreted. A knowledge base got wired in, so
bedrock:Retrieve was added. An action group got attached, so Lambda invocation was added. Someone hit an AccessDenied on a Friday and attached a broad managed policy to unblock the demo, and it was never taken back off. AWS's own documentation on BedrockAgentCoreFullAccess says the quiet part plainly: the managed policy grants broad permissions, and you should build a custom policy scoped to what your application actually needs.Broad managed policies are not a finding by themselves. Broad managed policies with no approval record and no scoping rationale are.
What I would ask for:
- The approval record for the agent's current permission set, and the date it was approved
- Policy version history — IAM retains prior versions of customer-managed policies, so you can see when scope expanded
- IAM Access Analyzer unused-access findings for the sampled roles
- Service last-accessed data for each role
The test that lands hardest: compare granted permissions to permissions actually exercised. When a role has been granted twenty actions and has used four in ninety days, the other sixteen are standing access with no business justification. For a human, that is an over-provisioning observation. For an agent, it is standing access exercised by a non-deterministic process that decides at runtime which of those actions to call.
Test 3: The leaver test, for something that never leaves
This is the one with no analogue, and it is the reason for the title.
Human deprovisioning has a trigger event. Someone leaves, a date is recorded, and the control is testable against that date: was access revoked within the defined window? The evidence chain is HR record → revocation log → timestamp comparison.
An agent has no trigger event. Nothing generates a signal when a project is abandoned, a proof-of-concept is quietly shelved, or the engineer who built it moves to another team. The agent does not stop working. It sits there, invocable, holding a role that AWS will happily let anything with
bedrock:InvokeAgent call.Worse, the deprovisioning of the human often makes it more dangerous, not less. The engineer leaves and is properly offboarded. Their agent stays, now with no owner, no one who remembers what it does, and no one willing to be the person who deleted something that turned out to be load-bearing.
What I would ask for:
- Evidence of a defined decommissioning trigger for agent identities — and if none exists, that is the finding, stated plainly
- Last-invocation data for each agent in the population
- For agents idle beyond a defined threshold, evidence of a periodic review decision to retain or retire
A useful compensating control to look for: whether the organisation sets an expiry expectation at creation. Non-human identities that must be affirmatively renewed decay safely by default. Ones that must be affirmatively deleted never decay at all.
Test 4: Attribution — whose action was that?
Access control assumes actions trace to actors. That assumption is what makes CloudTrail useful as audit evidence.
When an agent acts, CloudTrail records the assumed-role session that made the call. It does not record the human whose prompt caused the agent to decide to make it. If ten people can invoke the same agent, and the agent takes an action with financial-reporting relevance, the trail shows you the role. Reconstructing which request produced that action means correlating invocation logs against the CloudTrail entry by time and session, and hoping the invocation logging was turned on before you needed it.
This matters well beyond security. Any control an auditor relies on needs to be attributable to a responsible party. A control operated by an identity that ten people share, where the log shows the identity and not the person, is a control with an attribution gap — and the same gap that makes segregation of duties hard to enforce here makes it hard to evidence even where it is enforced.
What I would ask for:
- Confirmation that agent invocation logging is enabled and retained for the full audit period
- A walkthrough of one specific action end to end: prompt, invocation record, CloudTrail entry, resource change
- The list of principals permitted to invoke each agent, which is a distinct question from what the agent itself can do
Two things I would look for in the trust policy while I am there: whether it constrains
aws:SourceAccount and aws:SourceArn . AWS documents these conditions as a best practice for exactly this class of service role, and their absence is a concrete, evidenced observation rather than a matter of opinion.
What evidence should look like
If you are on the engineering side and would like the audit to go quickly, the difference is almost entirely in the artifact format.
Screenshots are weak evidence. They are undated by default, easy to take from the wrong account, and impossible to re-perform. API output is strong evidence: it is reproducible, it can be timestamped, and an auditor can watch you generate it and confirm the population was not filtered.
The practical version is a scheduled job that captures, on a fixed cadence: the role listing, the attached policies, last-accessed data, and Access Analyzer findings — written to a bucket with object lock and a retention period matching your audit cycle. Built once, it answers Tests 1 through 3 for every future review without anyone assembling anything by hand.
Auditors are not trying to catch you. We are trying to close a testing step. Give us something re-performable and the step closes.
The uncomfortable summary
Access review programmes were designed around the assumption that identities are created deliberately, by a process, with an owner and an end date. AI agents violate all three: they are created incidentally, often by a wizard, by people whose goal was to ship a feature.
The control gap is not that agents are dangerous. It is that they are invisible to the process that was built to catch dangerous things.
Start with Test 1. If the population listing and the internal register do not reconcile, you do not yet have an access management problem — you have a completeness problem, and every other control you rely on is being tested against the wrong list.
Ishika Dutta is a Computer Science Engineering undergraduate at IEM Kolkata (Class of 2027). She interned with EY India's Assurance Technology Risk practice, working on ITGC, ITAC and SAP S/4HANA SOX/ICFR compliance, and builds tooling at the intersection of AI/ML and technology risk.
Before you publish — verify these
Service details move fast. Check each of the following against current AWS documentation and update or cut anything that has changed:
- AgentCore's release status. Parts of the AgentCore documentation carried a preview notice. Confirm current GA status and adjust the framing if it has changed.
-
BedrockAgentCoreFullAccess. Confirm the policy still exists under that name and that AWS still carries the scoping recommendation.
- The trust policy service principal. Confirm
bedrock-agentcore.amazonaws.comand theaws:SourceAccount/aws:SourceArncondition guidance are current.
- Logging feature names. I've deliberately described invocation logging generically rather than naming a specific feature — if you want to name it, pull the exact current term from the docs.
- Access Analyzer capabilities. Confirm unused-access findings still cover the role types you're describing.
Cutting a specific claim costs you nothing here. The article's argument is structural and survives without any single service detail.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article