Which AWS service can identify when an Amazon EC2 instance was terminated?
AWS Identity and Access Management (IAM)
AWS CloudTrail
AWS Compute Optimizer
Amazon EventBridge
Explanations:
AWS Identity and Access Management (IAM) is responsible for managing user permissions and access to resources, but it does not track EC2 instance state changes like terminations.
AWS CloudTrail logs all API calls and actions taken within an AWS account, including EC2 instance terminations. It can capture this event and provide detailed information on when the instance was terminated.
AWS Compute Optimizer recommends optimal EC2 instance types based on your usage patterns but does not track or log instance termination events.
Amazon EventBridge can be used to monitor and respond to AWS events, but it doesn’t natively track EC2 instance terminations unless specifically configured to do so. CloudTrail is the service that captures this by default.