Your first webapp in the cloud, maintenance free

In my previous blog, I’ve talked about that you can use Amazon RDS and Elastic Beanstalk to deploy your database + webapp. With these serviced, you don’t have to worry about maintaining the operating sytems and the software running your database + webservice. Now, let’s go through the steps you need to go through to actually launch your database powered webapp this way:

Creating an account to take advantage of the free tier

First we’ll need an account. Luckily, Amazon has a pretty extensive free tier: you’ll be able to run 1 micro instance, a database with 25 GB of storage serving 200M requests per month and 5 GB of Amazon S3 space for free. This means it’s very possible to run your webapp online with no costs whatsoever.  So, let’s go to aws.amazon.com and create an account.

Please note that you still have to enter your credit card data, so when creating services, check whether it’s free tier applicable. In order to be sure how much (if anything) you have to pay, please keep an eye on the billing page. Also note that you can have multiple micro instances online without having to pay as long as you won’t go above 750 hours a month combined. This is also a problem because you don’t see multiple instances show up in your billing page this month until you’ve consumed your 750 hours, so be careful not to keep unnecessary instances running.

Setting up a database with Amazon RDS

Screen Shot 2015-03-26 at 12.05.43Go to your AWS console and don’t forget to select a region near you for best performance. Navigate to RDS, press the button Get Started Now and follow the steps presented. Note that choosing Multi AZ-deployment won’t fit in the free tier, but choosing SSD as storage type is no problem. Also note that if you set “publicly accessible” to yes, it will only mean  a publicly addressable address will be assigned. The default security group of your DB instance will still prevent the database from being accessed from the outside world.

To change that, either create a new security group and edit your DB Instance to use it, or change the security group to allow all request from everywhere:

Screen Shot 2015-03-27 at 16.35.37

Deploying your webapp with Elastic Beanstalk

Screen Shot 2015-03-26 at 15.26.25

Once again, in order to get started, just navigate to Elastic Beanstalk and press Get Started Now. The initial wizard is very handy in getting you up and running as quickly as possible. After you’ve had this working, I suggest creating a proper application (instead of the default one: My First Elastic Beanstalk Application) with a proper URL etc. After you’ve created your webapp, you’ll notice your webservice(s) being visible here. This exemplifies what Elastic Beanstalk really is: a handy tool which does the work for you, but the end result is still virtual servers hosting your webapp.

Also note you also have the possibility to create an RDS instance for your webapp when clicking on your environment>configuration>data tier, but you’ll have less options (you can’t select the version of your database for example), so I wouldn’t suggest it.

That’s all you need to get started! These services are really user friendly, so just follow the steps and you should be on-line in no-time.

Advertisements

One thought on “Your first webapp in the cloud, maintenance free

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s