{"id":3002,"date":"2019-07-01T23:40:03","date_gmt":"2019-07-01T21:40:03","guid":{"rendered":"http:\/\/miro.borodziuk.eu\/?p=3002"},"modified":"2021-07-05T19:59:25","modified_gmt":"2021-07-05T17:59:25","slug":"aws-elastic-beanstalk","status":"publish","type":"post","link":"http:\/\/miro.borodziuk.eu\/index.php\/2019\/07\/01\/aws-elastic-beanstalk\/","title":{"rendered":"AWS Elastic Beanstalk"},"content":{"rendered":"<p><span style=\"color: #3366ff;\">Elastic Beanstalk<\/span> (EB) is a Platform as a Service product. It allows you to deploy code and, with very little effort or modifications, the service will provision the infrastructure on your behalf.<\/p>\n<p>Elastic Beanstalk handles provisioning, monitoring, Auto Scaling, load balancing, and software updating for you \u2014 you just worry about the cost.<\/p>\n<p><!--more-->Deploy and manage applications without worrying about the infrastructure.<br \/>\nElastic Beanstalk handles capacity provisioning, health monitoring, Auto Scaling, load balancing, and updates for you automatically.<br \/>\nHighly available by default using two AZs and a load balancer.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3010 aligncenter\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB1.jpg\" alt=\"\" width=\"607\" height=\"695\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB1.jpg 607w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB1-262x300.jpg 262w\" sizes=\"(max-width: 607px) 100vw, 607px\" \/><\/p>\n<p>Elastic Beanstalk supports a number of languages and platforms:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Java<\/li>\n<li>Go<\/li>\n<li>.NET<\/li>\n<li>Python<\/li>\n<li>Ruby<\/li>\n<li>PHP<\/li>\n<li>Node.js<\/li>\n<li>Docker<\/li>\n<li>IIS<\/li>\n<li>Apache<\/li>\n<li>Nginx<\/li>\n<li>Tomcat<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3011 aligncenter\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB2.jpg\" alt=\"\" width=\"612\" height=\"726\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB2.jpg 612w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB2-253x300.jpg 253w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Patterns and Anti-Patterns for Elastic Beanstalk<\/p>\n<ul>\n<li><strong>YES<\/strong>: To provision an environment for an application with<strong> little admin overhead<\/strong><\/li>\n<li><strong>YES<\/strong>: If you use one of the supported languages and can add EB-specific config<\/li>\n<li><strong>NO<\/strong>: If you want low-level infrastructure control<\/li>\n<li><strong>NO<\/strong>: If you need Chef support<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Deployment Options<\/p>\n<ul>\n<li><span style=\"color: #999999;\">All at Once<\/span>: An updated application version is deployed to all instances. Quick and simple but not recommended for production deployments. Deploy the new version to all instances simultaneously. All instances your environment are out of service for a short time while the deployment occurs.<\/li>\n<li><span style=\"color: #999999;\">Rolling<\/span>: Beanstalk splits the environment&#8217;s EC2 instances into batches and deploys the new version of the application to one batch at a time.<\/li>\n<li><span style=\"color: #999999;\">Rolling with additional Batch<\/span>: As above, but provisions a new batch, deploying and testing before removing the old batch (immutable).<\/li>\n<li><span style=\"color: #999999;\">Blue\/Green<\/span>: Maintain two environments, deploy, and swap CNAME. Deploy the new version to a separate environment, and then swap CNAMEs of the two environments to redirect traffic to the new version instantly.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3012 aligncenter\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB3.jpg\" alt=\"\" width=\"533\" height=\"757\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB3.jpg 533w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/EB3-211x300.jpg 211w\" sizes=\"(max-width: 533px) 100vw, 533px\" \/><\/p>\n<p>When to Use Elastic Beanstalk<\/p>\n<ul>\n<li>To quickly provision an AWS environment that requires little to no management<\/li>\n<li>The application fits within the parameters of the Beanstalk service<\/li>\n<li>Can deploy from repositories or from uploaded code files<\/li>\n<li>Easily update applications by uploading new code files or requesting a pull from a repository<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>References:<\/p>\n<p><a href=\"https:\/\/aws.amazon.com\/blogs\/devops\/using-the-elastic-beanstalk-eb-cli-to-create-manage-and-share-environment-configuration\/\">https:\/\/aws.amazon.com\/blogs\/devops\/using-the-elastic-beanstalk-eb-cli-to-create-manage-and-share-environment-configuration\/<\/a><\/p>\n<p>Config options precedences :<\/p>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/command-options.html\">https:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/command-options.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Elastic Beanstalk (EB) is a Platform as a Service product. It allows you to deploy code and, with very little effort or modifications, the service will provision the infrastructure on your behalf. Elastic Beanstalk handles provisioning, monitoring, Auto Scaling, load balancing, and software updating for you \u2014 you just worry about the cost.<\/p>\n","protected":false},"author":1,"featured_media":3003,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[],"_links":{"self":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts\/3002"}],"collection":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/comments?post=3002"}],"version-history":[{"count":12,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts\/3002\/revisions"}],"predecessor-version":[{"id":4456,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts\/3002\/revisions\/4456"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/media\/3003"}],"wp:attachment":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/media?parent=3002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/categories?post=3002"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/tags?post=3002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}