
Answer-first summary for fast verification
Answer: Set the DeleteOnTermination attribute to False using the command line
Overall explanation Correct option: When an instance terminates, the value of the DeleteOnTermination attribute for each attached EBS volume determines whether to preserve or delete the volume. By default, the DeleteOnTermination attribute is set to True for the root volume and is set to False for all other volume types. Set the DeleteOnTermination attribute to False using the command line - If the instance is already running, you can set DeleteOnTermination to False using the command line. Incorrect options: Update the attribute using AWS management console. Select the EC2 instance and then uncheck the Delete On Termination check box for the root EBS volume - You can set the DeleteOnTermination attribute to False when you launch a new instance. It is not possible to update this attribute of a running instance from the AWS console. Set the DisableApiTermination attribute of the instance using the API - By default, you can terminate your instance using the Amazon EC2 console, command-line interface, or API. To prevent your instance from being accidentally terminated using Amazon EC2, you can enable termination protection for the instance. The DisableApiTermination attribute controls whether the instance can be terminated using the console, CLI, or API. This option cannot be used to control the delete status for the EBS volume when the instance terminates. The attribute cannot be updated when the instance is running. Stop the instance from Amazon EC2 console and then update the flag - This statement is wrong and given only as a distractor.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A development team has observed that a specific Amazon EC2 instance has been misconfigured, resulting in the 'DeleteOnTermination' attribute being set to True for its root Elastic Block Store (EBS) volume. This configuration implies that the root EBS volume will be deleted when the EC2 instance is terminated.
As an AWS Certified Developer Associate, can you recommend a method to disable this 'DeleteOnTermination' attribute while ensuring the EC2 instance continues to operate without interruption?
A
Update the attribute using AWS management console. Select the EC2 instance and then uncheck the Delete On Termination check box for the root EBS volume
B
The attribute cannot be updated when the instance is running. Stop the instance from Amazon EC2 console and then update the flag
C
Set the DisableApiTermination attribute of the instance using the API
D
Set the DeleteOnTermination attribute to False using the command line
No comments yet.