The S3 bucket was wide open and no one knew why. The logs told the truth—if you knew where to look.
Auditing and accountability in AWS is not optional. Miss one permission change or failed login alert, and the cost can be far more than money. The AWS CLI is the quiet lever that lets you pull detailed, real-time evidence from your infrastructure without guessing. It gives you exact commands, exact timestamps, exact users, and exact changes.
Proper AWS CLI auditing starts with precision. The aws cloudtrail lookup-events command is the foundation. Every API call is there—who made it, when, from where. Filter results to a suspicious time window. Pair that with aws iam get-user and aws iam list-attached-user-policies to see the true posture of any account in seconds.
The accountability layer is built with repeatable scripts. Run aws ec2 describe-instances to map live assets to actual usage. Use aws s3api get-bucket-acl for every stored object, detecting unintended exposure before it becomes public knowledge. Tie it back to CloudTrail and Config for a perfect triangulation of the “what,” “who,” and “how.”