AWS Certified SysOps Administrator – Associate (legacy) — Question 378
A user has launched an EC2 instance and deployed a production application in it. The user wants to prohibit any mistakes from the production team to avoid accidental termination. How can the user achieve this?
Answer options
- A. The user can the set DisableApiTermination attribute to avoid accidental termination
- B. It is not possible to avoid accidental termination
- C. The user can set the Deletion termination flag to avoid accidental termination
- D. The user can set the InstanceInitiatedShutdownBehavior flag to avoid accidental termination
Correct answer: A
Explanation
Enabling the DisableApiTermination attribute prevents the EC2 instance from being terminated via the Amazon EC2 console, CLI, or API, which protects it from accidental deletion. Other options, such as InstanceInitiatedShutdownBehavior, only control what happens when an OS-level shutdown is triggered, while 'Deletion termination flag' is not a valid EC2 attribute.