Exploring AWS App Deployment

By edgar, 21 October, 2021
keyboard

As a developer I have experience a wide range of hosting solutions with different plans, features, admin panels and price tags. But one thing that always kind of bother me was that a lot of these solutions utilize AWS web services to power their infrastructure.

In essence, I'm paying for some pre-configuration and a centralize panel to manage my applications. This got me thinking.

How much complexity am I staying away? and Is it cost effective for me? 

In other words, how much pain can I take before I pay for these services. The only way to really find out was building something from start to finish using only AWS (spoiler! I accidentally did not use AWS as my DNS provider because I was not aware of route 53).

As I started my research I discover this new product call lightsail from AWS which gives you pretty much all you need to get rolling on a project. It's pretty much a preconfigured instance that has some basic installations. They even have application agnostic configurations like wordpress, drupal, node, etc. For those who like to control everything, you can just get a basic linux box and go crazy. 

The lightsail product also is super affordable which is great for test projects like mine. You can get started for like $3 per month and you get 3 months free and you can always scale up (NOTE: I heard that you can always go up but not down). For my part I obviously picked the lowest price tag since I love a bargain. 

So far I'm way under the cost of that other solutions provide like Netlify, Vercel or Heroku. We still have a long way to go before we have our project ready to compare it to those solutions. But $3 is a great start.

Out of the box, you can setup a static ip for you application and if you don't mind memorizing long numbers then you are good to go. But for this project I decided to just get my own domain as you can see (jedgar1mx.com). Unfortunately, I didn't carefully browsed to the looong list of services in AWS and missed the Route 53 service which is for DNS. So I just went and google domain providers and cost. Out of the results I just picked domain.com  because it was cheap ($9). However, cheap was not the best option in this case. I found their documentation very lacking and most of AWS's documentation would only include examples with big providers like godaddy. If I had to do it again I would probably would go with Route 53 or just a provider with existing documentation.

Ok so now we have $3 per month for hosting and $9 per year for a domain which keeps us under $50 per year which is way under the competitors' basic price tag.

So now we have a server and a cool domain name so we now need to point it to something. In my case, it's this little site that you are currently reading. But for testing purposes it can be anything you want it to be, a really cool complex application or just a simple "Hello world" page.

So to get this cool application or page into our server we could just use some FTP client like filezilla and call it a day. But in order to get closer to an apples to apples comparison with these other hosting services we should setup an automatic process. Since most of the project that are ever see the light of day live in a version control system like Github or Gitlab we should have a way for any changes we public to our repos would magically appear on our site.

We can accomplish this magical transfer through the powers of Continuous Integration or CI. For AWS this service is called CodeDeploy. Essentially CodeDeploy keeps an eye for any changes you do to you repository and then say AHA! there is something new time to move it to your server. It could be a bit complex if you are new to automatization and AWS but it gets easier as you keep using it. However, this is not free but you get some free build hours per month (100) and get charged afterwards. This is pretty similar to other services. In reality, unless you are doing tons of changes daily you would probably never run out of build time. So far I used about $3 extra from CodeDeploy but this is because I of the initial development phase. I expect to be zero moving forward.

So now we are DONE!

As you can see, you can setup a really cool setup for a fraction of what some of those providers cost. HOWEVER, this is not a ding on those service. They provide so much configuration and ease of use that there is a very small learning curve. Where in this case, I had to sort through sooooo many wikis and documentation about different products and how to connect them. 

In summary, would I recommend setting your own system to everyone? Nope, it would probably frustrate a lot of folks out-there  and prevent them from working on cool little projects. Time is very valuable and free time is super limited for many. So unless you love to get your head in documentation and explore tech there are better places to use your time.

Hope you found this helpful.

Tags

Alias
exploring-aws-app-deployment

Comments