{"id":3894,"date":"2018-05-20T13:30:33","date_gmt":"2018-05-20T08:00:33","guid":{"rendered":"http:\/\/windowsvj.com\/wpblog\/?p=3894"},"modified":"2018-05-23T05:16:02","modified_gmt":"2018-05-22T23:46:02","slug":"deploying-a-web-application-on-aws-elastic-beanstalk","status":"publish","type":"post","link":"http:\/\/windowsvj.com\/wpblog\/2018\/05\/deploying-a-web-application-on-aws-elastic-beanstalk\/","title":{"rendered":"Deploying a Web Application on AWS Elastic Beanstalk"},"content":{"rendered":"<p>While working on a side project, I had a need to deploy a web app for a POC. Realized my existing GoDaddy hosting won&#8217;t be a good idea this time as I kind of hit the files threshold during migration of a WordPress\u00a0repo to GoDaddy instance. A few months ago when working on the first iteration of <a href=\"https:\/\/twitter.com\/vasujain\/status\/719376377745510400\">Jarvis<\/a>, I deployed it on Elastic Beanstalk, and this time again, Elastic Beanstalk came to rescue.<\/p>\n<p>Elastic Beanstalk is a cloud deployment and provisioning service that automates the process of getting applications set up on the Amazon Web Services Elastic Beanstalk is one layer of abstraction away from the EC2 layer. It sets up an environment for you that can contain Amazon Elastic Compute Cloud (EC2) instances, Amazon Simple Storage Service (S3) buckets, and load balancers to manage the application architecture for you.<\/p>\n<p>Found a pretty neat workflow diagram on <a href=\"https:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/Welcome.html\">AWS\u00a0Elastic Beanstalk page<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-3897 size-full\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/clearbox-flow-00-1.png\" alt=\"\" width=\"634\" height=\"172\" srcset=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/clearbox-flow-00-1.png 634w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/clearbox-flow-00-1-300x81.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Here is how to you can deploy and run a web app on\u00a0Elastic Beanstalk.<\/p>\n<ul>\n<li>If you don&#8217;t have an AWS account, you may need to <a href=\"https:\/\/portal.aws.amazon.com\/gp\/aws\/developer\/registration\/index.html\">create one<\/a>. From the AWS homepage, select<strong>\u00a0Elastic Beanstalk <\/strong>from <strong>Services<\/strong> menu in the top left corner.<br \/>\n<a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-9.35.01-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-3908\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-9.35.01-PM-1024x812.png\" alt=\"\" width=\"640\" height=\"508\" srcset=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-9.35.01-PM-1024x812.png 1024w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-9.35.01-PM-300x238.png 300w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-9.35.01-PM-768x609.png 768w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-9.35.01-PM.png 1322w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<li>From the\u00a0<strong>Elastic Beanstalk <\/strong>console, select <strong>Create Application<\/strong> with an Application name and details (optional) or choose an existing Application<\/li>\n<li>Once Application is created (selected),\u00a0select\u00a0<b>Create environment <\/b>from the Actions menu in the upper right corner.<\/li>\n<li>You can either choose <strong>Web server environment<\/strong> or Worker environment.\u00a0For creating a web application, choose former one. Environment tier configures and provisions the resources to support an application that handles HTTP requests or an application that pulls tasks from a queue.<br \/>\n<a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.17.43-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3932\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.17.43-PM.png\" alt=\"\" width=\"731\" height=\"621\" srcset=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.17.43-PM.png 731w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.17.43-PM-300x255.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/a><\/li>\n<li>On the next page, you can choose a Platform that matches the language used by your application. You can either choose\u00a0<strong>PreConfigured platform<\/strong> or <strong>Custom platform<\/strong>.<br \/>\n<a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.18.27-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-3933\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.18.27-PM-960x1024.png\" alt=\"\" width=\"640\" height=\"683\" srcset=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.18.27-PM-960x1024.png 960w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.18.27-PM-281x300.png 281w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.18.27-PM-768x819.png 768w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.18.27-PM.png 1205w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<li>Once a platform is chosen in step above, for <strong>Application code<\/strong>, you may choose Sample application. It may take a couple of minutes for\u00a0Elastic Beanstalk to create the\u00a0environment with above configuration. Once done, you can click on the URL next to the environment name to view the running application which is can be accessed publicly.\n<p><a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.18-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-3935\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.18-PM-1024x852.png\" alt=\"\" width=\"640\" height=\"533\" srcset=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.18-PM-1024x852.png 1024w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.18-PM-300x250.png 300w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.18-PM-768x639.png 768w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.18-PM.png 1189w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<li>From this point, you can continue making changes to your code. However, make sure when you deploy your code on\u00a0Elastic Beanstalk, you upload properly by selecting all the contents <strong>inside<\/strong>\u00a0the folder and then compressing the contents and not the folder itself.\u00a0 If you have a nested folder inside the zip, you may run into 403&#8217;s like I did.\n<p><a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.44-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3934\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.44-PM.png\" alt=\"\" width=\"953\" height=\"569\" srcset=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.44-PM.png 953w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.44-PM-300x179.png 300w, http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2018\/05\/Screen-Shot-2018-05-19-at-10.24.44-PM-768x459.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>AWS Elastic Beanstalk supports the following languages and development stacks:<\/p>\n<ul>\n<li>Apache Tomcat for Java applications<\/li>\n<li>Apache HTTP Server for PHP applications<\/li>\n<li>Apache HTTP Server for Python applications<\/li>\n<li>Nginx or Apache HTTP Server for Node.js applications<\/li>\n<li>Passenger or Puma for Ruby applications<\/li>\n<li>Microsoft IIS 7.5, 8.0, and 8.5 for .NET applications<\/li>\n<li>Java SE<\/li>\n<li>Docker<\/li>\n<li>Go<\/li>\n<\/ul>\n<p>Although there is a bit of learning curve here with AWS, once done it makes super easy to connect with other AWS services and build a modern web app.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on a side project, I had a need to deploy a web app for a POC. Realized my existing GoDaddy hosting won&#8217;t be a good idea this time as I kind of hit the files threshold during migration of a WordPress\u00a0repo to GoDaddy instance. A few months ago [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[277],"tags":[279,278],"class_list":["post-3894","post","type-post","status-publish","format-standard","hentry","category-aws","tag-amazon","tag-elastic-beanstalk"],"_links":{"self":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/comments?post=3894"}],"version-history":[{"count":7,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3894\/revisions"}],"predecessor-version":[{"id":3966,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3894\/revisions\/3966"}],"wp:attachment":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/media?parent=3894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/categories?post=3894"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/tags?post=3894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}