sunaba-sdk
v0.1.2
Published
High-level TypeScript SDK for AWS Lambda MicroVMs - sandboxes, exec, auth tokens, lifecycle
Maintainers
Readme
sunaba-sdk
High-level TypeScript SDK for AWS Lambda MicroVMs — session-scoped, stateful Firecracker sandboxes.
import { Sandbox } from "sunaba-sdk";
const sb = await Sandbox.create({ image: "demo" }); // name or ARN
const r = await sb.exec("echo hello"); // agent-free PTY exec
console.log(r.output, r.exitCode);
await sb.writeFile("/tmp/a.txt", "data");
await sb.suspend(); // snapshot kept
await sb.resume();
await sb.terminate();Sandbox.create / connect— launch or attach (auto-resumes SUSPENDED)sb.exec / sb.interactiveShell— managedSHELL_INGRESSWebSocket PTY, no guest agent neededsb.writeFile / readFile / request / websocket— fs helpers + authenticated HTTP and WebSocket to in-VM portsbuildMicrovmImage— zip → S3 →CreateMicrovmImage→SUCCESSFULwaitAuthTokenManager/ShellTokenManager— JWE mint + auto-refresh, port-scoped (endpoint tokens cover all ports unless you passallowedPorts)waitForMicrovmState,listMicrovms,resolveImageArn,latestActiveVersionsunaba-sdk/guest—startHooksServerserves the lifecycle hooks (/run,/suspend, …) from your app inside the VM
Docs: https://github.com/seike460/sunaba#readme
License: Apache-2.0
