How Amazon Keeps AI-Generated Code From Leaking Your Data
If AI writes and runs code for you, here's how your secrets stay safe.
AI is starting to write and run computer code on your behalf — picture an assistant that analyzes a spreadsheet or crunches scientific numbers for you. Very handy, but risky: what if it grabs another company's data, or quietly sends yours out to the internet? Benchling, whose software serves life sciences researchers, faced exactly that problem. Its AI generates scientific code for thousands of customer organizations at once.
The challenge is called "multi-tenant" — many customers sharing one system, like apartments in a single building. Each tenant's code must only ever see its own data. Ordinary sandboxes (software jail cells) weren't enough, because DNS — the internet's phone book that turns web addresses into locations — could still quietly look things up, creating a hidden exit door. Benchling needed total control over which addresses could even be looked up, and it needed to prove those controls kept working.
The fix was clever and simple in spirit: run all untrusted code in a completely separate Amazon cloud account with no internet connection at all. A DNS firewall blocks known bad addresses, allows only an approved list, and denies everything else. Each job gets its own temporary credential, like a hotel key that opens one room for one night only. The result: more than 600 code sessions a day across 250-plus customers, with zero security incidents.
So what does this mean for you? As AI "agents" — AI that can take actions, not just chat — spread into offices, hospitals, and banks, this invisible plumbing decides whether your data stays yours. You'll never see it, but it's the difference between a helpful AI coworker and a quiet leak. Companies that skip this step are one bad prompt away from a very bad headline.
- Benchling's AI runs code for thousands of different customers at once, so each customer's work is sealed off from all the others.
- The system handles 600+ code sessions daily across 250+ customers — and has had zero security incidents so far.
- The key trick: no internet access at all, a strict address-blocking firewall, and temporary one-job-only passwords.
Why It Matters
As AI that writes and runs code reaches your workplace, safeguards like these decide whether your private data stays private.