TECH BLOG 技術ブログ

2023.07.20 /

Instructions for building an Auto Scaling Group

Introduction

In this guide, we will introduce you to the process of setting up an Auto Scaling Group in AWS. An Auto Scaling Group is a convenient feature that automatically scales the number of EC2 instances based on the demand of your application or service. This allows for flexible handling of workload fluctuations and efficient resource utilization. So, let’s get started with the steps to build an Auto Scaling Group!

Steps to create an Auto Scaling Group

(1) Creating a Launch Template

From the EC2 dashboard, click on “Launch Templates” and then click on “Create Launch Template“. This will take you to the page for creating a launch template.

First, please enter the “Launch template name“. Select the appropriate “AMI” and “Instance type” based on your environment, and choose your own key pair.

Select the relevant VPC and security group, and click on “Create launch template” at the bottom right.

Once the template is created, you can view the details from the launch template list screen.

(2) Creating the Auto Scaling Group

From the EC2 dashboard, click on “Auto Scaling Groups“, then click on “Create Auto Scaling group” in the top right corner to navigate to the create Auto Scaling group page.

Enter the “Auto Scaling Group name” and select the launch template created in step (1), then click “Next” at the bottom right.

Select the appropriate VPC and subnet, then click “Next” at the bottom right.

Choose “Load balancing” according to your environment, and click “Next“.

Set the “Group size” (desired capacity, minimum capacity, maximum capacity) according to your requirements. Choose “Target tracking scaling policy” for the “Scaling policy“. Set up the scaling policy based on CPU usage. Once configured, click “Next“.

Keep the other settings as they are and click “Create Auto Scaling group” at the bottom right.

You may need to wait for a little while, but you should eventually see the instance count as 1.

With the configuration you have described, if the CPU utilization exceeds 70, the instances will automatically scale up. If everything is working as expected, then you have successfully completed the creation of the Auto Scaling Group.

Conclusion

Auto Scaling Groups are indeed a crucial feature for achieving automatic scalability in cloud environments. By following the detailed steps provided in this guide, you can leverage this functionality to enhance your projects and businesses. Feel free to refer back to this article whenever you need assistance with creating and managing your Auto Scaling Groups.

記事タイトルとURLをコピーする
test tel test tel