Hacker News new | ask | show | jobs
by jjeaff 2878 days ago
Localhost first is ideal. But not always possible.
1 comments

Can you explain why?
Why its ideal or not always possible?

Ideal because it's faster development time. And free since I'm not paying Amazon compute time to run my code while I write it.

Not always possible because I don't have AWS's services locally. As mentioned elsewhere, there are emulators but, by virtue of their emulation, may not always perform like the real thing. That's a debugging ball of wax that I personally hate having to untangle.

Which services are you using for which you are concerned about cost while you are developing?

You can access most (all?) of AWS services without running on AWS EC2/Lambda.

Can't these services be mocked out? Surely you are wrapping the service API with your own code to prevent vendor lock in right?
Doesn’t everyone just spinup and teardown either an EC2 based Docker host or and EKS worker as needed?

Especially for CRUD apps and otherwise simple apps, testing should start after git push.

Don’t want to wait each time? Automatic build and teardown of test envs on a schedule, to avoid always up.

I still local test low-level code. But anything running in a cloud should really just be tested there.

Proprietary software or hidden configurations. I have my site on localhost docker container. But I can't spin up an Aurora instance. So I use a similar mysql container. But it's not exactly the same.

And sometimes the data is too large to have fully on localhost. You can work with a subset, but if you have a 2tb database, it's not feasible to have the whole thing local for testing.