{"id":4296,"date":"2022-04-22T10:55:23","date_gmt":"2022-04-22T10:55:23","guid":{"rendered":"https:\/\/petabytz.com\/?p=4296"},"modified":"2026-02-19T07:06:00","modified_gmt":"2026-02-19T07:06:00","slug":"amazon-ec2-auto-scaling","status":"publish","type":"post","link":"https:\/\/petabytz.com\/blogs\/amazon-ec2-auto-scaling\/","title":{"rendered":"Amazon EC2: Auto Scaling"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"4296\" class=\"elementor elementor-4296\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a89e855 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a89e855\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;ekit_has_onepagescroll_dot&quot;:&quot;yes&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a9ce18c\" data-id=\"a9ce18c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e10f8b3 elementor-widget elementor-widget-heading\" data-id=\"e10f8b3\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Amazon EC2: Auto Scaling<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-04a2449 elementor-widget elementor-widget-text-editor\" data-id=\"04a2449\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1 id=\"3cab\" class=\"mv mw ct ba az dw mx my mz na nb nc nd ne nf ng nh\" data-selectable-paragraph=\"\">Auto Scaling Components<\/h1><h2 id=\"d409\" class=\"ut mw ct ba az dw uu uv uw ux uy uz va vb vc vd ve\" data-selectable-paragraph=\"\">1. Groups<\/h2><p id=\"e326\" class=\"mg mh ct ba mi b mj ni ml nj mn nk mp nl mr nm mt\" data-selectable-paragraph=\"\">They are the logical groups which contain the collection of EC2 instances which are having similar characteristics for scaling and management purpose. When you create a group, we can specify its minimum, maximum, and, desired number of EC2 instances.<\/p><h2 id=\"af81\" class=\"ut mw ct ba az dw uu uv uw ux uy uz va vb vc vd ve\" data-selectable-paragraph=\"\">2. Launch Configuration<\/h2><p id=\"71c1\" class=\"mg mh ct ba mi b mj ni ml nj mn nk mp nl mr nm mt\" data-selectable-paragraph=\"\">It is a template used by the auto-scaling group to launch EC2 instances. We can specify information such as the AMI ID, instance type, key pair, and security groups for your instances while creating the launch configuration.<\/p><h2 id=\"ab8d\" class=\"ut mw ct ba az dw uu uv uw ux uy uz va vb vc vd ve\" data-selectable-paragraph=\"\">3. Scaling Plan<\/h2><p id=\"e2f6\" class=\"mg mh ct ba mi b mj ni ml nj mn nk mp nl mr nm mt\" data-selectable-paragraph=\"\">The scaling plan informs Auto Scaling how and when to scale. Amazon EC2 auto-scaling provides the following ways for you to scale the auto scaling group:<\/p><p id=\"acf5\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">we need to create an AMI of our application which is running on our EC2 instance.<\/p><h2 id=\"56bf\" class=\"mv mw ct ba az dw mx my mz na nb nc nd ne nf ng nh\">Launch Configuration:<\/h2><p id=\"df38\" class=\"mg mh ct ba mi b mj ni ml nj mn nk mp nl mr nm mt\" data-selectable-paragraph=\"\">Go to EC2 console and click on Launch Configuration from Auto Scaling<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dd0a98f elementor-widget elementor-widget-text-editor\" data-id=\"dd0a98f\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p data-selectable-paragraph=\"\">2. Choose AMI, select the Amazon Machine Image from My AMIs tab, which was used to create the image for your web application.<\/p><p id=\"225d\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">3. Then, select the instances type which is suitable for your web application and click Next: Configure details.<\/p><p id=\"a009\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">4. On Configure details, name the launch configuration, you can assign if any specific IAM role is assigned for your web application, and also you can enable the detailed monitoring.<\/p><p id=\"1641\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">5. After that, Add the storage and Security Groups then go for the review.<br \/>Note: Open the required ports for your application to run.<\/p><p id=\"f131\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">6. Click on Create launch configuration and choose the existing key pair or create a new key pair<\/p><ul class=\"\"><li id=\"0dc1\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt vl ts tt\" data-selectable-paragraph=\"\"><strong class=\"mi mu\">Setup: Auto Scaling Group:<\/strong><\/li><\/ul><ol class=\"\"><li id=\"b465\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt tr ts tt\" data-selectable-paragraph=\"\">From EC2 console click on Auto Scaling Group which is below the launch configuration. Then click on create the auto-scaling group.<\/li><li id=\"63d8\" class=\"mg mh ct ba mi b mj vm ml vn mn vo mp vp mr vq mt tr ts tt\" data-selectable-paragraph=\"\">From the Autoscaling Group page, you can create either using a launch configuration or Launch Template. Here I have created using Launch Configuration. You can create a new Launch Configuration from this page also. Since you had already created the launch configuration, you can go for creating the auto-scaling group by using \u201cUse an existing launch configuration\u201d.<\/li><li data-selectable-paragraph=\"\"><p>\u00a0After clicking on the next step, you can configure group name, group initial size, and VPC and subnets. Also, you can configure load balance with an auto-scaling group by clicking Advanced Details.<\/p><\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5cf9fe1 elementor-widget elementor-widget-text-editor\" data-id=\"5cf9fe1\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"8b3e\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">After that click on next to configure scaling policies<\/p><p id=\"b9c3\" class=\"mg mh ct ba mi b mj mk ml mm mn mo mp mq mr ms mt\" data-selectable-paragraph=\"\">4. On the scaling policy page, you can specify the minimum and the maximum number of instance in this group. Here you can use target tracking policy to configure the scaling policies. In metric type, you can specify such as CPU utilization and Network In or Out and also you can give the target value as well. Depending on the target value the scaling policy will work. You can also disable scale-in from here.<\/p><p>You can also use Step and simple scaling policies.<\/p><p>It works based on the alarm, so first, create the alarm by clicking on \u2018add new alarm\u2019.<\/p><p>Here the alarm created is based on CPU utilization above 65%. If CPU utilization crosses 65% the auto-scaling launches new instances based on the step action.<\/p><p>You can specify more step actions based on your load, but in the simple policy, you can\u2019t categorize depending on the percentage of CPU utilization. Also, you need to configure scale-in policies once the traffic becomes low, as it reduces the billing.<\/p><div class=\"wpb_text_column\"><p data-selectable-paragraph=\"\">5. Next click on \u2018Next: Configure Notification\u2019 to get the notification based on the launch, terminate, and fail, etc. to your mail ID, and enter the tag and click on \u2018Create auto-scaling group\u2019<\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Amazon EC2: Auto Scaling Auto Scaling Components 1. Groups They are the logical groups which contain the collection of EC2 instances which are having similar characteristics for scaling and management purpose. When you create a group, we can specify its minimum, maximum, and, desired number of EC2 instances. 2. Launch Configuration It is a template [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25,1],"tags":[],"class_list":["post-4296","post","type-post","status-publish","format-standard","hentry","category-blogs","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/posts\/4296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/comments?post=4296"}],"version-history":[{"count":3,"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/posts\/4296\/revisions"}],"predecessor-version":[{"id":14723,"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/posts\/4296\/revisions\/14723"}],"wp:attachment":[{"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/media?parent=4296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/categories?post=4296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/petabytz.com\/blogs\/wp-json\/wp\/v2\/tags?post=4296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}