Every cloud service is somehow wrapper over Linux and other things providing something extra. Having root understanding of it gives more clarity of others
A tiny cloud, on your own machine.
10,000 lines of Rust and Golang. The minimum amount of code required to turn your Linux machine into a full cloud.
- Linux
- One machine or a small cluster
- Open source
What tiny-aws is
A self-hosted mini-AWS for one Linux machine, or a small cluster. It keeps the features people actually use, and leaves the rest out. This is not AWS's code. It is an educational project you can run, then open and read.
You get EC2-like compute and Lambda-like functions on hardware you already have. A tinyaws.build file describes the box in a few lines. No Docker image, no registry. The agent builds a rootfs, hides the host, and starts your process.
- EC2An instance is a systemd-nspawn container with its own filesystem and network.
- LambdaUpload a function and invoke it. The scheduler finds a machine and runs it.
- S3An object store: a C++ block engine behind a Rust HTTP API.
- ELBA round-robin load balancer. Deploy a service and reach it on port 8088.
- SQSA queue backed by SQLite, with visibility timeouts.
- SNSPub/sub. One event, fanned out to subscribers over HTTP.
- IAMBearer tokens with a role and an expiry. Admin or readonly.
- VPCSubnets and security groups as metadata, enforced with iptables on the machine.
One Linux box, a whole cloud
The CLI talks to a control plane. The control plane picks a machine. That machine starts an instance with its own filesystem and network.
The tinyaws CLI calls the registry, scheduler, and controller over HTTP. The scheduler assigns work to an agent, which starts instances i-1, i-2, and i-3. A load balancer sits in front of them. Object storage, a queue, and IAM run on the same box.
- 01
Launch
tinyaws instance launch asks the scheduler for a machine. An agent on that box starts the instance.
- 02
Isolate
The instance gets its own rootfs. overlayfs and pivot_root hide the host. cgroups cap CPU and memory.
- 03
Serve
Deploy a directory as a service. The load balancer on :8088 routes to it. Storage, queues, and IAM sit beside it.
Small enough to read the whole thing
Same ideas as a cloud provider. A codebase you can open on a Tuesday and actually finish.
- Codebase
- 10,000
- Rust and Golang
- Instance types
- 5
- nano through large
- Where it runs
- 1 box
- or a small cluster
- Docker
- None
- debootstrap rootfs
- Cloud bill
- $0
- your hardware
A teaching cloud. Not a second AWS, and not trying to be one.
Clone it, then boot the stack
A Linux machine, a base rootfs, and the CLI. After that, an instance or a deploy is one command.
Step 1: Start tiny-aws
You need Go, Rust, cmake, and debootstrap. bootstrap-rootfs.sh builds the base system once. run-local.sh compiles the agents and starts the registry, scheduler, controller, object store, and load balancer.
Linux
$git clone https://github.com/OSS-Initiatives-IIIT-Sonepat/tiny-aws.git && cd tiny-aws$sudo ./scripts/bootstrap-rootfs.sh$./scripts/run-local.sh$cd control-plane/cli && go install .Step 2: Launch, deploy, store
go install puts tinyaws on your PATH. Launch an instance, deploy a directory as a service, or talk to storage and queues with the same CLI.
$tinyaws instance launch --type smalli-1 small provisioning$tinyaws instance list✓ i-1 small running
From the thread
What people think about Tiny AWS.
System programming changes your whole perspective towards computer science. I have been building kernel drivers and EDR sensors for the past 2 years and damn, there is so much to learn.
Docker is already built on namespaces and cgroups, so going directly to these primitives gives more control over isolation and resource limits.
10k lines of Go and Rust, just a CLI, no React — that's a proper tiny AWS.
this matters more post-ai than it did before: generation got cheap and verification didn't. you can't tell whether 10k lines of go and rust are right unless you've built the tcp stack once. whoever reviews is the ceiling on what the fleet can ship.
These is one of the best advice in this AI era for developers
building tiny aws is the fastest way to understand why big aws charges like that
Now that sounds some engineering rather than just learning syntax for another framework
Ten thousand lines with no framework is a solid way to learn what the abstractions hide.
一万行就能搭个迷你云,不靠Docker这点有意思,拿来学原理挺合适
文档有bug,图没显示出来
好的谢谢,这个项目很棒感谢你的工作🫡
As someone fascinated by AI hardware, I couldn’t agree more. Whether you’re building an AI agent or an embedded device, understanding what’s happening beneath the abstractions makes all the difference. The closer you get to the machine, the more fundamentals matter.
Respect for keeping it CLI and skipping the React tax. The constraint of no Docker/VMs forces you to learn the real seams — scheduling, isolation, networking — that frameworks usually hide.
you literally became one of the true programmers now. Figuring out to do something and then telling how to is the best thing. VERY WELL BROTHER
tiny aws in 10k lines with no docker is soo coool, which part was the hardest to get working, networking?
Sick of bloated tech stacks? Me too. @shubhamm069 nails it. Simplicity rocks, especially when it's a homebrewed AWS. Building a CLI cloud from scratch? Now that's spirit!
i’m writing an http server for this reason. after this is I want to do a mini shell and then a database of some form
Good work! One thing I wanted to point out (which I didn't see explicitly mentioned) is that containers use cgroups and namespaces for isolation. However, in cloud environments, this is kernel-based isolation, which has security and multi-tenancy implications.
Agree on the why. Even a small Go tool that spawns and watches local processes teaches you more about signals and exit codes than another framework. But nobody should need a TCP stack before shipping their first app.
absolutely insane, if you don't mind me asking how did you make your diagrams? (It's extremely helpful)
Hey! Really impressed by your work and your vision. Could you share your learning journey, the skills you developed, and the roadmap you followed? Also, how do you add subtitles to your videos? I'm planning to create videos and would love some guidance on where to start. Thanks!
Tiny AWS is cool, but the real test is whether the bill is also tiny or still a mystery at month end
The best explanation
The best advice
You deserve millions of follows mate.
Very based take
I do System Programming and I Love that.
Taking inspirations bro !
that sounds like an incredible journey into the depths of programming! Building your own "tiny AWS" from scratch is truly inspiring
good work 🔥🔥🔥. keep it up
respect man.. You seem to be a genuinely good person.