Running MiniStack in the browser and in Node (without Docker) with Pyodide #1772
ThailerL
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I built Pocket Region, which runs MiniStack under Pyodide. It runs in a browser tab or a Node process, and so do your Lambda handlers, in Web Workers or child processes. You point the normal AWS SDK at it:
Pyodide can't open a listening socket, so requests go straight into MiniStack's ASGI app as function calls.
You can try it in your browser. The demo has a terminal that runs
awscommands against it, and examples in the docs are editable and run in your tab.I ran the boto3 examples from your service pages through it without changes. 65 of the 70 printed the same thing they print against MiniStack itself. The other five fail in both, so they're bugs in the examples (the DynamoDB one uses a table name that's too short, for example). I'm happy to open an issue with the details. Each of those examples could get a Run button that runs it in the reader's tab.
It started as the AWS region for Glass Garden, a drag-and-drop AWS sandbox that runs real code. Here's an SQS queue draining through a Lambda in it:
queue-demo.webm
Pocket Region runs the MiniStack wheel from PyPI with some glue for Pyodide. The biggest piece is threads.
Thread.startschedules onto the event loop andtime.sleepsuspends through JSPI, so the pollers, schedulers, and Step Functions waits all run as your code wrote them.All reactions