Previously, I’ve written about hosting an HTTP api on AWS api gateway. In this article, I’ll try to deploy a nodejs application on AWS ElasticBeanstalk.
Create an Elastic Beanstalk application
Use one of these sample applications, here I’ll use tomcat.zip
In a few minutes, AWS will deploy the server environment with load balancer, security group, etc. When it is ready, the console will redirect to the environment page. Follow the link shown on top to open the tomcat application.
The sample Java webapp contains a index.jsp page. One can easily modify tomcat.zip and put an actual webapp there. One of the cool things about Elastic Beanstalk is once a new version of deployment archive is ready, one can use upload and deploy to deploy the new version. If there is any issue, one can easily switch back to the previous versions. Also check out the Blue/Green deployment methodology to minimize service downtime.