AWS Certified Devops Engineer Professional · Free Practice Question Medium

Question 13

A DevOps engineer deployed an application to AWS which makes use of Amazon EC2 Auto Scaling to launch new instances. The engineer needs to modify the instance type used for all new instances that are launched through automatic scaling. The Auto Scaling group is configured to use a launch template.

Which of the following actions should be taken to achieve this requirement?

  • A

    Launch new EC2 instances with the new instance type using the AWS CLI and attach them to the Auto Scaling group.

  • B

    Modify the existing launch template to create a new version that uses the new instance type and modify the Auto Scaling group to use the new template version.

  • C

    Create an AWS Elastic Beanstalk environment to deploy the new instance type for all scaling events.

  • D

    Use the Overrides structure to define a new launch template for individual instance types using the existing Auto Scaling group.

Reveal correct answer

Correct answer: B

Explanation

When you make a change to an existing launch template it creates a new version of the template. It is then easy to modify the Auto Scaling group to use the new version. As you can see in the diagram below you can modify the launch template used or the version of the launch template used.

In this case the engineer can simply save a new version of the template and then update the version of template used by the Auto Scaling group. All subsequent scaling events will launch using the new version of the template.

CORRECT: "Modify the existing launch template to create a new version that uses the new instance type and modify the Auto Scaling group to use the new template version" is the correct answer (as explained above.)

INCORRECT: "Use the Overrides structure to define a new launch template for individual instance types using the existing Auto Scaling group" is incorrect.

The Overrides structure is used to define a different launch template for specific instance types. The best solution for this scenario is to simply update the launch template.

INCORRECT: "Create an AWS Elastic Beanstalk environment to deploy the new instance type for all scaling events" is incorrect.

There is no need to move the solution to Elastic Beanstalk as the launch template can simply be updated.

INCORRECT: "Launch new EC2 instances with the new instance type using the AWS CLI and attach them to the Auto Scaling group" is incorrect.

This is not a good solution as it is highly manual. The solution should be automated.

References:

https://docs.aws.amazon.com/autoscaling/ec2/userguide/examples-launch-templates-aws-cli.html

Save time with our exam-specific cheat sheets:

https://digitalcloud.training/amazon-ec2-auto-scaling/

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need