AlexStack
AlexStack

Reputation: 17431

Code-Test-Code cycle in Amazon Cloud (AWS)

I new to Amazon AWS and want to create a cloud-based REST API in Node.js.

Usually I develop the program along with testing it. It means I write some tests, and then write the code that makes those tests run successfully. So in a typical programming session, I may run the tests or the app tens of times.

  1. When I do this locally it is easy and quick. But what if I want to do the whole process on Amazon cloud? How does this code-test-code cycle look like? Should I upload my code to AWS every time I make a change? And then run it against some server address?

  2. I read somewhere in the documentation that when I run a task for a few minutes (for example 15min), Amazon rounds it up to 1hour. So if in a typical development session I run my program 100 times in an hour, do I end up paying for 100 hours? If yes, then what will be the solution to avoid these huge costs?

Upvotes: 0

Views: 150

Answers (1)

BraveNewCurrency
BraveNewCurrency

Reputation: 13065

When I do this locally it is easy and quick.

You can continue to do so. Deploying in the cloud is does not require developing in the cloud.

But what if I want to do the whole process on Amazon cloud?

When I do this, usually edit the code locally, the rsync my git directory up to the server and restart the service. It's super-quick.

Most people develop locally, and occasionally test on a real AWS server to make sure they haven't broken any assumptions (i.e. forgot something at boot/install time).

There are tools like Vagrant that can help you keep your server installation separate from your development environment.

As you grow (and you've got more money), you'll want to spin up staging/QA servers. These don't have to be run all the time, just when changes happen. (i.e. have Jenkins spin them up.) But it's not worth automating everything from the start. Make sure you're building the right thing (what people want) before you build it right (full automation, etc.)

So if in a typical development session I run my program 100 times in an hour, do I end up paying for 100 hours?

Only if you launch a new instance every time. Generally, you want to continue to edit-upload-run on the same server until it works, then occasionally kill and relaunch that server to make sure that you haven't screwed up the boot process.

Upvotes: 2

Related Questions