When an AWS S3 bucket is accessed, every request leaves a trail. That trail lives in audit logs. Done right, those logs don’t just answer who touched your data, they reveal what they did, when they did it, and how. The wrong setup means shadows, blind spots, and fear. The right setup—paired with strict read-only IAM roles—means full visibility without risk of accidental writes or deletes.
Audit logs for S3 begin with enabling AWS CloudTrail. Every read request, from GetObject to ListBucket, is captured when logging is configured for data events. Without that setting, you’ll see only control plane operations like bucket creation or policy changes. For engineers responsible for sensitive data, enabling object-level logging is non‑negotiable.
A read-only IAM role is your second shield. Define a policy that grants s3:Get* and s3:List* permissions only. Exclude any Put, Delete, or Write operations. Attach this policy to a role instead of a user, and force access through temporary credentials. This protects the bucket from both accidents and intentional tampering. It also makes the audit trail clean—every action from this role was read-only by design, so any write event is an immediate red flag.