exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 94 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 94
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

A company's application is running on Amazon EC2 instances in an Auto Scaling group. A DevOps engineer needs to ensure there are at least four application servers running at all times. Whenever an update has to be made to the application, the engineer creates a new AMI with the updated configuration and updates the AWS CloudFormation template with the new AMI ID. After the stack update finishes, the engineer manually terminates the old instances one by one, verifying that the new instance is operational before proceeding. The engineer needs to automate this process.

Which action will allow for the LEAST number of manual steps moving forward?

  • A. Update the CloudFormation template to include the UpdatePolicy attribute with the AutoScalingRollingUpdate policy.
  • B. Update the CloudFormation template to include the UpdatePolicy attribute with the AutoScalingReplacingUpdate policy.
  • C. Use an Auto Scaling lifecycle hook to verify that the previous instance is operational before allowing the DevOps engineer's selected instance to terminate.
  • D. Use an Auto Scaling lifecycle hook to confirm there are at least four running instances before allowing the DevOps engineer's selected instance to terminate.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
daheck
2 years, 1 month ago
Selected Answer: A
https://repost.aws/knowledge-center/auto-scaling-group-rolling-updates Option B is incorrect because the AutoScalingReplacingUpdate policy terminates all instances in the Auto Scaling group simultaneously and creates new instances, which does not satisfy the requirement of having at least four application servers running at all times.
upvoted 2 times
...
easytoo
2 years, 2 months ago
its A like for Apple.
upvoted 2 times
...
devopsbro
2 years, 2 months ago
Selected Answer: A
A is correct Autoscaling Rolling Update: Autoscaling Rolling Update is a mechanism that allows for updates to be applied to instances in an autoscaling group in a rolling fashion. This means that a few instances are taken down at a time, updated, and then brought back up before the next set of instances are taken down. This process continues until all instances have been updated. Autoscaling Rolling Update helps to ensure that there is no downtime and that the application remains available throughout the update process. Autoscaling Replacing Update: Autoscaling Replacing Update is a mechanism that replaces the entire set of instances in an autoscaling group with new instances. Unlike Autoscaling Rolling Update, this method takes down all the old instances at once and replaces them with new instances. Autoscaling Replacing Update is faster than Autoscaling Rolling Update since it replaces all instances at once, but there is a period of downtime during the update process.
upvoted 2 times
...
Piccaso
2 years, 2 months ago
Selected Answer: B
Only B satisfies the scenario: "After the stack update finishes, the engineer manually terminates the old instances one by one, verifying that the new instance is operational before proceeding. " https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate
upvoted 1 times
AkaAka4
2 years, 1 month ago
Please think twice before you comment, so that people won't get confused by all your comments...
upvoted 6 times
...
...
Piccaso
2 years, 3 months ago
Selected Answer: D
Both A and B cannot guarantee that "at least four application servers running at all times". C is involved by D.
upvoted 1 times
Piccaso
2 years, 3 months ago
I changed my mind from D to A because of comment of adozoo
upvoted 1 times
...
...
DerekKey
2 years, 3 months ago
Selected Answer: B
B - correct (in my opinion) - requirement: LEAST number of manual steps moving forward Solution: use AutoScalingReplacingUpdate policy and set "AutoScalingReplacingUpdate" : { "WillReplace" : "true" } The AutoScalingReplacingUpdate will be terminating instances ONLY after new instances are available and stable. A - also correct to some extent but the potential problem is related to roll back - with the rolling update you have to take care of auto scaling group configuration Note: If an unexpected scaling action changes the state of the Auto Scaling group during a rolling update, the update can fail. The failure can result from an inconsistent view of the Auto Scaling group by AWS CloudFormation.
upvoted 2 times
...
Bulti
2 years, 3 months ago
Selected Answer: A
A is correct because of the ability to specify MinInstanceInService attributes on the autoscalinggroup update policy.
upvoted 1 times
Bulti
2 years, 3 months ago
I think the answer is B not A. With AutoScalingReplacing updatePolicy we specify whether an Auto Scaling group and the instances it contains are replaced during an update. During replacement, CloudFormation retains the old group ( 4 instances that were originally present) until it finishes creating the new one. If the update fails, CloudFormation can roll back to the old Auto Scaling group and delete the new Auto Scaling group. While CloudFormation creates the new group, it doesn't detach or attach any instances. After successfully creating the new Auto Scaling group, CloudFormation deletes the old Auto Scaling group during the cleanup process.
upvoted 1 times
...
...
Imstack
2 years, 4 months ago
AAAAAAAAAAAAAA
upvoted 1 times
...
adozoo
2 years, 5 months ago
Selected Answer: A
For rolling updates, you can specify whether AWS CloudFormation updates the instances in the Auto Scaling group in batches, or all instances at once.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago