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

  1. Select the isolation boundary from the threat model rather than a general claim of being very secure.
  2. 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.

  1. List the capabilities available if generated code behaves maliciously.
  2. Move production access behind a narrowly scoped, validated tool boundary.
  3. 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?

Continue with AWS documentation

Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.

Saved in this browser. Press again to undo.

Prepaid · USD

Top up balance

Available balance: $0.00

Your balance works across Heap tools. A failed lookup or generation releases its reserved amount.