You have an application hosted in an AWS Auto Scaling group.
This application was created using a Cloudformation template.
Now your application has got a surge of users which is decreasing the performance of the application.
As per your analysis, a change in the instance type to C3 would resolve the issue.
Which of the below option can introduce this change while minimizing downtime for end-users?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B.
The cloudformation template should be updated with the new instance type.
The AWS::AutoScaling::AutoScalingGroup resource supports an UpdatePolicy attribute.
This is used to define how an Auto Scaling group resource is updated when an update to the CloudFormation stack occurs.
A common approach to updating an Auto Scaling group is to perform a rolling update, which is done by specifying the AutoScalingRollingUpdate policy.
According to the parameters specified, this retains the same Auto Scaling group and replaces old instances with new ones.
Option A is incorrect because the change should be performed through the CloudFormation template.
It is not appropriate to change it directly in the AWS console.
Option C is incorrect because you cannot directly change an existing launch configuration through the AWS console.
Option D is incorrect because we need the AutoScalingRollingUpdate attribute in the CloudFormation template to ensure a rolling update is performed.
For more information on AutoScaling Rolling updates, please refer to the below link:
https://aws.amazon.com/premiumsupport/knowledge-center/auto-scaling-group-rolling-updates/The correct answer for this scenario is B - Update the launch configuration in the AWS CloudFormation template with the new C3 instance type. Add an UpdatePolicy attribute to the Auto Scaling group that specifies an AutoScalingRollingUpdate. Run a stack update with the updated template.
Explanation: AWS Auto Scaling group allows you to scale out/in the number of instances in response to changes in demand. When the demand increases, the Auto Scaling group will add more instances, and when the demand decreases, it will remove instances. AWS CloudFormation is a service that provides infrastructure as code (IAC) to automate the deployment of your infrastructure resources.
In this scenario, we need to change the instance type of the application to C3 to resolve performance issues. However, we need to ensure that there is minimal downtime for end-users. To achieve this, we can use AWS CloudFormation to update the launch configuration with the new C3 instance type and add an UpdatePolicy attribute to the Auto Scaling group that specifies an AutoScalingRollingUpdate.
The AutoScalingRollingUpdate UpdatePolicy attribute allows Auto Scaling to perform a rolling update, which updates the instances one at a time with the new instance type. During the rolling update, the Auto Scaling group will keep the original instances running while launching new instances with the updated launch configuration. This ensures that there is no downtime for end-users.
Once the CloudFormation template is updated with the new instance type and the UpdatePolicy attribute, we can run a stack update to apply the changes to the Auto Scaling group. Auto Scaling will then perform the rolling update, updating the instances with the new instance type one at a time.
Option A is not the best option because it involves manually copying the old launch configuration and creating a new launch configuration. This can be error-prone and time-consuming, especially if you have a large number of instances.
Option C is also not the best option because updating the existing launch configuration can cause downtime for end-users. This is because the existing instances will need to be terminated and replaced with instances of the new instance type.
Option D is similar to Option B, but it does not include the UpdatePolicy attribute, which means that Auto Scaling may terminate and replace all instances simultaneously, causing downtime for end-users.
Therefore, Option B is the best option for introducing the change while minimizing downtime for end-users.