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 197 discussion

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

A company uses AWS CloudFormation to manage an application that runs on Amazon EC2 Instances. The instances are in an Amazon EC2 Auto Scaling group. The company wants to treat its infrastructure as immutable.

A DevOps engineer must implement a solution to replace two EC2 instances at a time whenever operating system configuration updates are needed or when new Amazon Machine. Images (AMIs) are needed. A minimum of four EC2 instances must be running whenever an update is in progress.

Which solution will meet these requirements?

  • A. Modify the CloudFormation template to include an UpdatePolicy attribute for the Auto Scaling group. Include the AutoScalingRollingUpdate policy with MinInstancesInService of 4 and MaxBatchSize of 2. Whenever a software update is needed, alter either or both of the ImageId and UserData of the AWS::EC2::LaunchTemplate and update the stack.
  • B. Set the Auto Scaling group’s minimum capacity to 4. Create an AWS CodeDeploy deployment group that has an in-place deployment type. Select Amazon EC2 Auto Scaling group for the environment configuration. Whenever a new revision is available, create a new CodeDeploy deployment that has a deployment configuration of CodeDeployDefault HalfAtATime.
  • C. Set the Auto Scaling group's minimum capacity to 4. Create an AWS CodeDeploy deployment group that has a blue/green deployment type. Select Amazon EC2 Auto Scaling group for the environment configuration. Whenever a new revision is available, create a new CodeDeploy deployment that has a deployment configuration of CodeDeployDefault HalfAtATime.
  • D. Modify the CloudFormation template to include a StackPolicy. Designate an AutoScalingReplacingUpdate policy to control the update. Specify MinInstancesInService of 4 and MaxBatchSize of 2. Whenever a software update is needed, alter either or both of the ImageId and UserData of the AWS::EC2::LaunchTemplate and update the stack.
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
easytoo
2 years ago
A you say?
upvoted 1 times
...
tycho
2 years ago
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html
upvoted 1 times
tycho
2 years ago
yes, it has to be A
upvoted 1 times
...
...
saeidp
2 years, 2 months ago
Selected Answer: A
A is the best
upvoted 3 times
...
CloudFloater
2 years, 2 months ago
Option B is incorrect because it suggests using AWS CodeDeploy to perform an in-place deployment type, which is not appropriate for replacing EC2 instances in batches. Option C is incorrect because it suggests using AWS CodeDeploy to perform a blue/green deployment type, which is not appropriate for replacing EC2 instances in batches. Option D is incorrect because it suggests using a StackPolicy to control the update, which is not appropriate for this use case.
upvoted 4 times
...
CloudFloater
2 years, 2 months ago
Selected Answer: A
Option A is the correct solution. It involves modifying the CloudFormation template to include an UpdatePolicy attribute for the Auto Scaling group with the AutoScalingRollingUpdate policy. This policy allows for rolling updates that replace instances in batches of a specified size, which in this case is two instances at a time. The MinInstancesInService attribute ensures that a minimum of four instances are running whenever an update is in progress. To update the software, either the ImageId or UserData of the AWS::EC2::LaunchTemplate is altered and the stack is updated.
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