Pocket Region
AWS services like S3, DynamoDB, and Lambda inside a browser tab or your Node process, called with the ordinary AWS SDK. No container and no server.
import { clientConfig, createRegion } from 'pocket-region/browser';
const region = await createRegion();
const s3 = new S3Client(clientConfig(region));
await s3.send(new PutObjectCommand({ Bucket: 'photos', Key: 'cat.txt', Body: 'meow' }));import {
clientConfig,
createRegion,
} from 'pocket-region/browser';
const region = await createRegion();
const s3 = new S3Client(clientConfig(region));
await s3.send(new PutObjectCommand({
Bucket: 'photos',
Key: 'cat.txt',
Body: 'meow',
}));In a browser tab
A whole region runs in a page, in a Web Worker, with no backend behind it. The page loads it from jsDelivr, and a first visit downloads about 10.8 MB.
Run buttons for your docs
Put a Run button on the AWS examples in your own docs. createRunner runs code written for real AWS, JavaScript or Python, against a region in the reader’s tab.
The aws CLI in your page
Run aws commands against a region and render the output in your page. Commands copied from AWS’s documentation run unchanged.
In your Node tests
The region lives in your test process and keeps real state, with no container to start. It boots in about half a second and resets to empty in about a millisecond, so every test starts clean.
Lambda
Create functions from a zip and invoke them. Handlers run in child processes or Web Workers, with their timeouts and reserved concurrency, and their own SDK calls reach the region.
Built on MiniStack
The AWS APIs come from MiniStack, a Python AWS emulator running here under Pyodide. It answers for many more services, and the docs list which ones run here.