- Published on
Just Get It Working
- Authors

- Name
- Mamun Rashid
The people and the company in this post are made up. The situations aren't. They're stitched together from things I've run into while getting small products online, and telling them as one week was easier than telling them as five.
Lina messaged me on a Monday night in January. A chain of physiotherapy clinics we'd been talking to wanted to see the app on Friday. A real demo, with their front-desk staff clicking around, not screenshots in a deck.
"Can you just get it working?"
At that point the app ran in two places: Lina's laptop and mine. It was a Next.js booking tool for small clinics. It had a MongoDB database, a handful of API keys, and no production home at all.
Here's where I stood going in. Lina had written most of the product code. I knew it needed a MONGODB_URI, an auth secret and a couple of API keys, and I knew pnpm build && pnpm start worked. That was about the extent of it. My job that week was to keep someone else's code running somewhere real, which is what a lot of platform work turns out to be.
So the rules for the week were simple. Ship by Friday. Don't build anything we would have to babysit. Don't optimize, because we had no idea yet what needed optimizing.
By Monday at midnight there were four boxes on the whiteboard: somewhere to keep the code, somewhere to run the app, somewhere for the data, and somewhere for the secrets. The code already lived on GitHub, so really it was three.
Tuesday: a server or a container
My first instinct was a VPS. Rent a small box, SSH in, install Node, run the app under pm2, point a domain at it. I have done it a dozen times and it works. A lot of the internet still runs that way, and plenty of businesses never move off it.
What talked me out of it was thinking about six months later. If the app worked, we would want to move somewhere bigger, and a hand-built server is a pet you have to rebuild by memory. A Docker image is the whole environment in one file. Moving it later means pointing a different runtime at the same image, which is a much smaller job than redoing every deploy step.
Here is roughly how I weighed it:
| Option | Good at | Costs you |
|---|---|---|
| VPS | Dedicated CPU and memory, good for heavy sustained compute | You own the OS, patches, restarts and scaling |
| Managed PaaS | Push code, get a running app | The platform builds the artifact, so it is harder to move |
| Container on a managed runner | You own the image, the provider runs it, scaling and restarts are built in | You learn Docker, and you trust a box you can't see inside |
The app wasn't short on CPU. We were short on time. Container it was.
Tuesday afternoon: where the container runs
Every cloud has an entry-level service meant to get you through the door. On AWS that's App Runner. You give it an image and it runs it, with HTTPS, scaling and restarts handled for you. Under the hood it sits on the same container infrastructure as everything else at AWS, with most of the knobs hidden.
The image needs somewhere to live first, so it goes into ECR, Amazon's container registry. The whole deploy fits in a few lines:
aws ecr get-login-password --region us-east-1 \
| docker login --username AWS --password-stdin "$REGISTRY"
docker build -t "$REGISTRY/app:latest" .
docker push "$REGISTRY/app:latest"
aws apprunner start-deployment --service-arn "$SERVICE_ARN"
Lina asked whether we were locking ourselves into AWS. Fair question. My answer was that we were already locked in the moment we picked a cloud. App Runner or ECS, it's the same provider underneath. What we were really choosing was how much of the stack we wanted to operate ourselves, and that week the answer was as little as possible.
Wednesday: who looks after the data
This is where I could feel myself getting ambitious. Run our own MongoDB on an instance? Set up replica sets, backups, a VPC so the database isn't on the internet?
Then I asked myself who on our team of two was the database administrator. Nobody. Bigger companies hire a DBA because a busy production database is a full-time job: backups, retention, failover, upgrades, the index build that locks things up at 2pm. If nobody is going to do that job, the database should be as small a problem as you can make it.
So we rented one. A managed MongoDB cluster gave us a connection string in a few minutes, with backups and monitoring included. It also came with a public endpoint, which made me nervous for about ten minutes. It's also the reason it was quick: no peering, no firewall rules to get wrong at midnight. We used TLS, a long generated password and an IP allowlist, and moved on.
I don't expect us to stay on the free tier forever. Managed databases get expensive as you grow, because that's their business model. But we had zero paying customers, and a database bill before your first customer is money you didn't need to spend. Every major provider has a free tier now. Use it until revenue tells you otherwise.
Thursday: where the secrets go
By Thursday we had a database password, an auth secret and two API keys. The easy move was pasting them into App Runner's environment variables in the console. That works, but then the secrets live in a console, in someone's shell history and maybe a Slack DM, and nobody knows who changed what.
I put them in AWS Systems Manager Parameter Store instead. It's a key-value store with encryption and a UI, and there's nothing to deploy. App Runner can read parameters directly and expose them to the app as environment variables, so the image never contains a secret.
Lina asked why not Secrets Manager, since it's literally named after the problem. Both encrypt with KMS and both would have worked. The difference is mostly shape. Parameter Store is one value per key (/app/prod/mongodb-uri, /app/prod/auth-secret), and the standard tier is free. Secrets Manager stores a whole document per secret, can rotate it for you, and charges per secret each month. For four values and one service, Parameter Store was plenty. We'll look again when we have more services and want rotation.
Thursday night: everything by hand
This is what we ended up with.
Every green arrow in that picture is me at a terminal. Pushing the image, changing a config value, triggering a deploy. No pipeline, no Terraform, no preview environments.
I went back and forth on whether that was embarrassing. I decided it wasn't. Automation takes time to build and more time to maintain, and in week one you don't know which of those arrows you'll run fifty times and which you'll run twice. Do them by hand, notice which ones hurt, automate those first.
Friday
The demo worked. The front-desk staff booked a few fake appointments, cancelled one, rebooked it, and nothing fell over. Lina sent me a single thumbs-up, which from Lina is a standing ovation.
What I didn't know on Friday was everything App Runner was doing on our behalf. Was there a CDN in front? Caching? How did a deploy actually swap traffic over? I had no idea, and I had chosen not to have one. That's the trade you make with a managed service, and I think it was the right one. You just have to remember you made it.
It came back to bite us a few weeks later. A deploy failed its health check and App Runner quietly rolled back to the previous image. The build was green. The site was old. We spent an hour debugging a fix that wasn't live yet. Deploys also queue one at a time, so two pushes close together land minutes apart, which made it even more confusing.
These days I check App Runner's deployment history after every deploy, and then I open the site and look. A green build only tells you an image exists somewhere.
The Monday after
The following week Lina forwarded a message from Omar, an investor friend of the company: "Shouldn't you be on Kubernetes?"
I could have replied with a comparison table. I wrote three sentences instead. We're on a managed runner because it scales on its own and neither of us has to operate a cluster. We'll revisit it when cost or a feature forces us to. Because everything ships as a container, moving will be a small job when that day comes.
Writing those three sentences took me longer than some of the config did. I keep noticing that the longer I do this kind of work, the more of it is explaining a decision in terms the business cares about, and the less of it is YAML.
What I'd tell myself in January
Optimize for shipping and learning, because you can't optimize what you don't understand yet. Four boxes is enough to launch: code, app, data, secrets. Start with containers if you think you'll grow; it's cheap now and annoying later. Rent the database if nobody on the team wants to be a DBA, and stay on free tiers until money says otherwise. Keep secrets out of the image and out of pasted environment variables. Doing things by hand is fine for a while.
And learn how your platform tells you about a failed or rolled-back deploy before the day you need to know. Ours told us very politely, by saying nothing at all.
Enjoyed this post?
Subscribe to get notified about new posts and updates. No spam, unsubscribe anytime.
By subscribing, you agree to our Privacy Policy. You can unsubscribe at any time.
Discussion
Loading comments...
This website is still under development. If you encounter any issues, please contact me.
Found this useful? Support the blog