How do you find who performed an action recently with CloudTrail?
BeginnerProductionRapid-Fire AWS CLI
Answer
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=EventName,AttributeValue=DeleteSecurityGroup \
--start-time 2026-11-08T00:00:00Z --max-results 20 \
--query 'Events[].[EventTime,Username,Resources[0].ResourceName]' --output table
lookup-events covers 90 days of management events in the current region only; use CloudTrail Lake or Athena on the org trail for anything else.
More on Rapid-Fire AWS CLI
How do you check which identity and account the CLI is using?BeginnerHow do you log in with Identity Center (SSO) from the CLI?BeginnerHow do you assume a role manually and export the credentials?IntermediateHow do you list running instances with name, ID, type and private IP in a table?BeginnerHow do you find the latest Amazon Linux 2023 AMI without hard-coding an ID?BeginnerHow do you open a shell or port-forward to a private instance without SSH?Beginner