I've been digging into using AWS (Amazon Web Services) to deploy my apps to the cloud. It is very promising as it employs a "pay as you go" model and scales very nicely.
Since I'm a java guy, I downloaded the AWS plugin for eclipse (3.7) and started in with the sample app, which is a travel log. It was very easy to setup as when you create a new AWS project, it is an option to create the sample travel log app. Once created, you can simply right click on it and choose "run on server", which has the nice effect of deploying to the AWS cloud.
Mind you that I'm skipping a few steps about creating an AWS account, getting the credentials, adding those credentials to eclipse via the preferences panel and all that. Most tutorials you'll find online (including the very nicely written one from AWS) all describe this.
At any rate, performing the "run on serve" will fire up an elastic beanstalk instance and deploy the webapp to it. Within a few minutes I was able to navigate to the app via firefox and interact. Very cool.
After a few days I wanted to kill that instance as I didn't want the app continually running (remember, pay as you go right). I logged into the AWS management site, selected the instance and told it to stop. It did indeed stop. Within a minute or so, a new elastic beanstalk instance was running the app and was listed in the running instances table. wtf right?
I guess the whole point of the elastic beanstalk is it will fail over to a new instance and keep at least one instance of your app running in the cloud. This is outstanding for a production system but sucks for dev. I fumbled around google for awhile trying to figure out to do.
I came across a nice article that explained how to really stop the app.
Using eclipse, bring up the AWS exlorer. Drill through AWS Elastic Beanstalk until you hit your app. Simply right click and select "terminate". You'll get an alert box asking if you're sure. Select yes and it will undeploy your app from the cloud, effectively killing the instance.
I thought I'd pass along this little nugget in case any other devs where freaking out about usage. :-)
No comments:
Post a Comment