Using Amazon S3 server access logs for Security, Compliance & Auditing
Overview
Organizations running workloads on AWS often store their most critical data in Amazon S3, from application data and analytics datasets to backups, logs, and regulated content. With that responsibility comes a fundamental question: how do I know who is accessing my data, what they're doing with it, and whether those actions comply with my security policies?
Amazon S3 server access logs answer that question by recording requests made to your buckets, successful or failed, authenticated or anonymous, with HTTP-level detail not available in other common log sources. With Amazon S3 server access logs now available as a native data source for CloudWatch unified data store, those logs are automatically delivered to CloudWatch without the need to build custom ETL pipelines or transformation workflows. CloudWatch unified data store transforms the raw Amazon S3 server access log data into a structured, queryable format, enabling immediate use of CloudWatch Logs Insights, metric filters, Contributor Insights rules, and Amazon S3 Tables integration. Combined with AWS CloudTrail management events, server access logs become a powerful, cost-effective pillar of your Amazon S3 security and compliance posture.
The Customer Challenge
Many teams face a common set of questions when monitoring Amazon S3 data-plane activity:
- Visibility gaps: CloudTrail management events (included at no additional cost) cover bucket-level configuration changes but don't show who is reading, writing, or deleting individual objects.
- Cost at scale: High-volume buckets (millions of requests per day) need visibility without unbounded cost growth.
- Pipeline complexity: Traditional server access log setups required bucket policies, lifecycle management, and custom transformation workflows to make the logs queryable in tools like CloudWatch. CloudWatch unified data store now eliminates the need to build custom ETL pipelines to deliver and structure those logs for analysis.
- Compliance evidence: Frameworks like PCI-DSS, HIPAA, SOC 2, and FedRAMP require proof of encryption-in-transit (TLS version), access controls, and data retention. These fields are uniquely available in server access logs.
- Operational depth: Request latency, bytes transferred, HTTP status codes, and Amazon S3 lifecycle operations (expirations, transitions) are only captured in server access logs.
This guide shows how Amazon S3 server access logs, delivered natively into CloudWatch unified data store, address these challenges and how to use them alongside CloudTrail for defense in depth.
With Amazon S3 server access logs as a native CloudWatch unified data store data source, you get broad, low-cost visibility with built-in transformation and immediate queryability, combined with guaranteed delivery from scoped CloudTrail data events on your most sensitive buckets. No custom ETL pipelines, no additional transformation workflows. Just enable the native integration and start querying, filtering, and alerting on your Amazon S3 access data.
CloudTrail Amazon S3 data events and server access logs: complementary strengths
Both CloudTrail Amazon S3 data events and Amazon S3 server access logs record object-level activity, and there is meaningful overlap in the operations they capture. Understanding what each source brings to the table helps you design a logging strategy that maximizes coverage while managing costs.
Where They Overlap
The core data-plane operations (GetObject, PutObject, DeleteObject, CopyObject, HeadObject, multipart uploads, and ListObjects) appear in both log sources when both are enabled. For these operations, you get two independent records of the same request.
What Each Source Uniquely Provides
Rather than choosing one over the other, consider what each source adds that the other cannot:
- ☁️ CloudTrail Data Events
- 📋 Server Access Logs
- 🤝 Shared Fields
| Capability | Detail |
|---|---|
| Delivery guarantee | ✅ Every API call is recorded and delivered |
| Delivery latency | Typically 5–15 minutes |
| IAM identity detail | ✅ Full userIdentity block: ARN, session context, assumed role chain, MFA status |
| Request/response parameters | ✅ Full JSON: encryption settings, ACL grants, condition keys |
| Streaming destinations | ✅ Amazon S3, CloudWatch Logs, or CloudTrail Lake |
| Selective logging | ✅ Advanced event selectors filter by bucket ARN, event name, read/write |
| Per-event cost | Per-event charge (see pricing) |
| Capability | Detail |
|---|---|
| HTTP-level detail | ✅ http_status, bytes_sent_size, object_size, total_duration, turn_around_duration, referer |
| Signature version | ✅ Explicit signature_version field (SigV2 vs SigV4) |
| Authentication type | ✅ Explicit field (AuthHeader, QueryString, or null for anonymous) |
| ACL required | ✅ acl_required field for ownership controls migration |
| S3 lifecycle operations | ✅ S3.EXPIRE.OBJECT, S3.TRANSITION_SIA.OBJECT, etc. |
| Source region | ✅ source_region (originating region, useful for cross-region detection) |
| Native CloudWatch unified data store integration | ✅ Logs flow directly into CloudWatch unified data store with immediate access to Logs Insights, metric filters, Contributor Insights, and Amazon S3 Tables |
| Built-in transformation | ✅ CloudWatch unified data store automatically transforms raw Amazon S3 server access logs into a structured, queryable format with no custom ETL pipelines required |
| Per-event cost | ✅ CloudWatch Logs ingestion + storage (see pricing). Amazon S3 server access log events are significantly smaller than CloudTrail data events, resulting in lower per-event ingestion cost |
Both sources provide these fields, and either source works:
| Field | Description |
|---|---|
| TLS version and cipher suite | Transport-layer security details for the connection |
| Source IP address | IP address of the requester |
| User agent | Client tool or SDK that made the request |
| Error codes | Amazon S3 error responses (e.g., AccessDenied, NoSuchKey) |
| Object key | The object name that was accessed |
| Bucket name | The target bucket for the request |
When to Lean on Each Source
- CloudTrail Strengths
- Server Access Log Strengths
- 🔒 Compliance audits requiring complete accounting of every object access. Guaranteed delivery means no gaps in the audit trail.
- 🔍 Forensic investigations where you need the full IAM identity chain: who assumed which role, whether MFA was used, what session context was active.
- 📋 Understanding request parameters: what encryption algorithm was applied to a PutObject, what ACL grants were set, what condition keys were evaluated.
- ⚡ Real-time streaming to CloudWatch Logs or CloudTrail Lake for immediate analysis, alerting, and dashboarding.
- 🎯 Selective, cost-controlled logging. Advanced event selectors let you log only write operations on specific buckets, so you pay only for what matters most.
- 🔑 Detecting deprecated SigV2 usage. The
signature_versionfield is only available in server access logs. - ♻️ Tracking Amazon S3 lifecycle operations. Expirations, transitions, and delete marker creation are internal Amazon S3 actions that CloudTrail does not log.
- ⏱️ Performance analysis. Request latency (
total_duration,turn_around_duration), bytes transferred, and object size are only in server access logs. - 💰 High-volume buckets with cost efficiency. For buckets handling millions of requests per day, server access logs delivered through CloudWatch unified data store provide comprehensive visibility at CloudWatch Logs ingestion and storage cost. Because Amazon S3 server access log events are significantly smaller than CloudTrail data events, the per-event ingestion cost is substantially lower, and CloudWatch's volume-tiered pricing further reduces cost at scale (see CloudWatch pricing).