When the user shuts down the instance from the OS, what will happen?
The OS will shutdown but the instance will not be terminated due to protection
It will terminate the instance
It will not allow the user to shutdown the instance from the OS
It is not possible to set the termination protection when an Instance initiated shutdown is set to Terminate
Explanations:
The termination protection prevents termination, but it does not prevent the instance from being shut down. Since the “Instance initiated shutdown” is set to Terminate, the instance will terminate when the OS shutdown command is issued.
Since the “Instance initiated shutdown” behavior is set to terminate, shutting down the instance from the OS will trigger the termination of the EC2 instance, regardless of termination protection.
Termination protection does not prevent the OS from shutting down the instance. It only prevents termination through AWS Management Console or API.
Termination protection can be enabled while the “Instance initiated shutdown” behavior is set to terminate. The two settings are independent.