One command pulled down a month of access records, grouped by AWS CLI-style profiles, and it was all there: who did what, when, and from where. No blind spots. No messy exports. No endless console clicking. Just clean, audit‑ready access logs that could stand in front of any compliance review without flinching.
AWS CLI‑style profiles are the backbone for managing multiple accounts, roles, and permissions at scale. But without structured logging tied to those profiles, it’s guesswork when incidents happen. Building a habit of pulling and reviewing logs with the same profile configuration you use for deployments closes that gap. It means every API call, resource change, and authentication event gets mapped back to an exact identity context.
For an audit, speed matters. Investigators want to see proof. Proof lives in structured, timestamped, query‑friendly access logs. Storing them in a format optimized for search is as important as their capture. JSON streams, S3 archival, and automated rotation policies keep logs lean and long‑lived, but instantly reachable. And when those logs are indexed with a query layer—Athena, OpenSearch, or even your own SQL—investigation time drops from hours to seconds.