The mental model
A sandbox limits what code can reach and affect. Before choosing one, identify who controls the code, which data it may see, what credentials it can use, and whether other tenants share its environment. Ordinary containers can share a host kernel. A microVM adds a virtual-machine boundary with its own guest kernel, but the security of the complete service also depends on identity, network access, lifecycle, and the host configuration.
Isolation from another tenant does not prevent exfiltration using an allowed network path, destructive actions through an overprivileged role, or an authorized but unwanted external tool call. Keep production credentials out of untrusted execution. Bound CPU, memory, storage, time, sessions, and requests. Validate outputs and deliberately destroy or reset state at the end of a tenant session.
Decisions to make
- Select the isolation boundary from the threat model rather than a general claim of being very secure.
- Design separate controls for compute isolation, data authorization, egress, tool actions, and resource consumption.
Design exercise · no AWS resources needed
Work through a scenario
An AI assistant runs user-generated code and can also access a production database.
- List the capabilities available if generated code behaves maliciously.
- Move production access behind a narrowly scoped, validated tool boundary.
- Specify per-session identity, restricted egress, resource limits, and cleanup checks.
Check your understanding
What can a microVM boundary fail to prevent on its own?
Choose an answer to see the reasoning.
Continue with AWS documentation
- AgentCore Runtime security best practices (opens in a new tab)
- Fargate security considerations (opens in a new tab)
Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.