Most teams building production access control for AI agents on AWS get the front half right and skip the back half. They scope the role, they add an approval, they rotate the keys. Then they record the agent's activity using a log the agent itself writes, and that single choice quietly undoes the rest. The commonly-skipped control is not access scoping. It is putting the record of what the agent did somewhere the agent cannot touch.
This post is about that gap, because it is the one that turns a tidy access setup into something you cannot defend during an incident.
The control that gets skipped
Production access control has an enforcement half and an evidence half. The enforcement half decides what the agent may do: scope, approval, expiry. Teams invest here because it is the part that prevents the bad thing. The evidence half decides whether you can prove what the agent did, and it gets skipped because, on a good day, you never read it.
But the evidence half is the one that has to survive a bad day. If the only record of an agent's session lives inside the agent process or in a store the agent can write to, then a compromised agent edits its own history. You scoped the access perfectly and still cannot say what happened, because the witness and the suspect are the same process.
Why agents make this gap worse
With a human operator, a self-written log is already weak, but the human is slow and a missing entry is conspicuous. An agent runs in a loop and can issue hundreds of calls in the time a person reads one line. If its self-written record drops the slice that matters, the gap is not one command, it is a burst of them, and there is no human pacing to make the absence obvious.
So the property production access control needs for agents is sharper than for people: the record has to be continuous, complete, and produced by something other than the agent. That is only practical when the recording happens at the point the agent connects, before anything reaches AWS.
The architectural fix
State the requirement first: the record must live outside the process the agent controls, written by the layer that brokers access rather than by the agent that uses it. A log the agent writes about itself is a claim. A log written by the access boundary is evidence.
hoop.dev is built to be that boundary. The agent connects through hoop.dev, a Layer 7 access gateway, instead of holding AWS credentials. hoop.dev applies the enforcement half, scoped, per-task, approved access, and reaches each AWS-hosted resource with its own scoped IAM role. Because the session runs through the gateway, hoop.dev records it on the gateway side, outside the agent, where a compromised agent has no write path to alter it. The enforcement half and the evidence half live at the same boundary, so production access control is one surface rather than two systems you hope agree. The learn pages cover how access and recording fit together, and the getting-started docs walk through fronting an AWS-hosted resource.
How to check for the gap
- Find where the agent's session record is written. If it is inside the agent or a store the agent can reach, you have the gap.
- Confirm the record captures denied attempts, not just successful actions. An investigation needs the access that was blocked as much as the access that worked.
- Confirm each record ties to a distinct agent identity and the task behind it, so "who" and "why" are answerable without trusting the agent.
- Move the record to the access boundary, on the far side from the agent, and pair it with the access decision that produced it.
Get the enforcement half right and skip this, and you have production access control that works until the day you need to prove it did. Close the gap and the control holds under the exact pressure it exists for.
FAQ
Isn't CloudTrail enough for production access control?
CloudTrail is a strong account-level source, but it logs API calls by role, not the full session, the task, or the access decision behind it, and it sits in the account the agent may influence. Pair it with a session record written at the access boundary, outside the agent.
What is the single most-skipped control here?
Recording the session outside the agent. Teams scope and approve access well, then let the agent write its own record, which fails in exactly the compromise scenario the record exists for.
hoop.dev is open source. To put production access control and recording at one boundary in front of AWS, start with the repository on GitHub.