You have configured the following AWS services in your organization - Auto Scaling group, Elastic Load Balancer, and EC2 instances.
You have been requested to terminate an instance from the Autoscaling Group when the CPU utilization is less than 30%
How can you achieve this.
Click on the arrows to vote for the correct answer
A. B. C. D. E.Answer - B.
The AWS Documentation mentions the following.
You should have two policies, one for scaling in (terminating instances) and one for scaling out (launching instances), for each event to monitor.
For example, if you want to scale out when the network bandwidth reaches a certain level, create a policy specifying that Auto Scaling should start a certain number of instances to help with your traffic.
But you may also want an accompanying policy to scale in by a certain number when the network bandwidth level goes back down.
For more information on the scaling plans,please see the below link:
http://docs.aws.amazon.com/autoscaling/latest/userguide/scaling_plan.htmlTo terminate an instance from the Autoscaling Group when the CPU utilization is less than 30%, we can use CloudWatch alarms in conjunction with Auto Scaling group.
CloudWatch is a monitoring service provided by AWS that can monitor and collect metrics, logs, and events from various resources in your AWS environment. CloudWatch alarms can be configured to trigger actions when specific conditions are met, such as when a metric breaches a threshold.
Auto Scaling group is an AWS service that can automatically add or remove EC2 instances based on predefined policies. It can also be integrated with CloudWatch alarms to automatically trigger scaling actions.
Here are the steps to achieve the requirement:
Option B is the correct answer as it describes the correct way to use CloudWatch alarms and Auto Scaling group to remove an instance from the group. Option A is incorrect because it suggests sending a notification to SQS, which cannot directly remove an instance from the Autoscaling Group. Option C is also incorrect because it suggests sending a notification to the ELB, which also cannot remove an instance from the Autoscaling Group. Option D is incorrect because it suggests that the ELB can remove an instance, which is not true. The ELB can distribute traffic to instances, but it cannot remove instances from the Autoscaling Group. Option E is also incorrect because it suggests manual intervention, which defeats the purpose of automation provided by AWS services.