# 3.9 Ensure Object-Level Logging for Read Events Is Enabled for S3 Buckets (Automated)

- Source: https://support.icompaas.com/support/solutions/articles/62000233163-3-9-ensure-object-level-logging-for-read-events-is-enabled-for-s3-buckets-automated-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [AWS CIS V.4 Level 1 Benchmarks](https://support.icompaas.com/support/solutions/62000112671) › [CIS Control 3](https://support.icompaas.com/support/solutions/folders/62000169197)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

## Profile Applicability:

**Level 2**

## Description:

AWS S3 Object-Level API Operations (GetObject, DeleteObject, PutObject) are categorized as Data Events in AWS CloudTrail.By default, CloudTrail does not log Data Events, so manual configuration is required to capture object-level access details.This control ensures that object-level logging is enabled for all S3 read operations, providing full visibility into data access.

## Rationale:

-   Enhances security monitoring: Tracks unauthorized data access.
-   Meets compliance requirements: Supports audits for PCI DSS, SOC 2, ISO 27001, NIST, and CIS benchmarks.
-   Assists in forensic investigations: Provides historical logs of who accessed S3 data.Improves accountability: Helps organizations track data exfiltration attempts.

## Impact:

-   Provides detailed auditing of all read events in S3.
    
-   Helps detect unauthorized access attempts.
    
-   Supports incident response and compliance reporting.
    

## Default Value:

-   CloudTrail does NOT log object-level API actions by default.
-   Must be manually enabled for each S3 bucket.

## Pre-Requisites:

 IAM permissions required:

-   cloudtrail:UpdateTrail
    
-   cloudtrail:GetEventSelectors
    
-   cloudtrail:PutEventSelectors
    
-   s3:PutBucketLogging
    
-   s3:GetBucketLogging
    
-   s3:PutBucketPolicy
    

AWS CLI installed for automation.

## Remediation:

### Test Plan:

## Using AWS Console

Step 1: Check If Object-Level Logging Is Enabled in CloudTrail

1.  Login to AWS Console → Go to [AWS CloudTrail](https://console.aws.amazon.com/cloudtrail/)
    

      ![](https://support.icompaas.com/assets/kb/1625067e6e18a762.png)

2.  Click Trails in the left panel
    

                           ![](https://support.icompaas.com/assets/kb/42907fd8e1550063.png)

3.  Select the CloudTrail trail you want to check
    

![](https://support.icompaas.com/assets/kb/f040c48d522b3de2.png)

4.  Scroll down to Data Events
    

     ![](https://support.icompaas.com/assets/kb/f2c0017a179ba02a.png)

5.  Confirm the configuration:
    
6.  Repeat for all regions and all trails.
    

## Using AWS CLI

Step 1: List All CloudTrail Trails

aws cloudtrail describe-trails --region <region-name> --output table --query trailList\[\*\].Name

Step 2: Verify If CloudTrail Is Multi-Region

aws cloudtrail get-trail --name <trail-name> --region <region-name>

Step 3: Check If Object-Level Logging for S3 Is Enabled

aws cloudtrail get-event-selectors --region <region-name> --trail-name <trail-name> --query EventSelectors\[\*\].DataResources\[\]

Implementation steps:

## Using AWS Console

Step 1: Enable S3 Data Events in CloudTrail

1.  Login to AWS Console → Go to [AWS CloudTrail](https://console.aws.amazon.com/cloudtrail/) 
    

![](https://support.icompaas.com/assets/kb/3f2323ca541846db.png)

2.  Click Trails in the left panel
    

              ![](https://support.icompaas.com/assets/kb/38bd574a0f61b168.png)

3.  Click on the trail name
    

    ![](https://support.icompaas.com/assets/kb/31aa6805fd152033.png)

4.  Click Edit under General details
    

    ![](https://support.icompaas.com/assets/kb/d03fbc1636f3dbb6.png)

5.  Scroll down to Data events
    

   ![](https://support.icompaas.com/assets/kb/252ed34aa291aad4.png)

6.  Select S3 → Choose Log all events
    

  ![](https://support.icompaas.com/assets/kb/6a372fe5e951c553.png)

7.  Click Save changes
    

     ![](https://support.icompaas.com/assets/kb/032265b3f07eafd3.png)

Repeat for all trails in all regions.

## Using AWS CLI:

Step 1: Enable Object-Level Logging for a Specific S3 Bucket

aws cloudtrail put-event-selectors --region <region-name> --trail-name <trail-name> \\
    --event-selectors '\[{
        "ReadWriteType": "ReadOnly",
        "IncludeManagementEvents": true,
        "DataResources": \[{
            "Type": "AWS::S3::Object",
            "Values": \["arn:aws:s3:::<s3-bucket-name>/"\]
        }\]
    }\]'

Step 2: Enable Object-Level Logging for ALL S3 Buckets

aws cloudtrail put-event-selectors --region <region-name> --trail-name <trail-name> \\
    --event-selectors '\[{
        "ReadWriteType": "ReadOnly",
        "IncludeManagementEvents": true,
        "DataResources": \[{
            "Type": "AWS::S3::Object",
            "Values": \["arn:aws:s3"\]
        }\]
    }\]'

## Backout Plan:

If enabling object-level logging causes excessive costs:

Disable Object-Level Logging via AWS CLI

 aws cloudtrail put-event-selectors --region <region-name> --trail-name <trail-name> \\
    --event-selectors '\[{ "ReadWriteType": "None", "IncludeManagementEvents": true }\]'

Verify Logs Are Disabled

aws cloudtrail get-event-selectors --region <region-name> --trail-name <trail-name>

If S3 object-level logging is missing, the change is successful.

##   
References:

-   [Logging Data Events for Amazon S3 with AWS CloudTrail](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-cloudtrail-events.html)
    
-   [Logging Management and Data Events with CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
    
-   [Amazon S3 Data Event Logging](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-services.html#cloud-trail-supported-services-data-events)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
