π AWS S3 Bucket Server Access Logging is not enabled π’
- Contextual name: π Bucket Server Access Logging is not enabled π’
- ID:
/ce/ca/aws/s3/bucket-server-access-logging
- Located in: π AWS S3
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- AWS Trusted Advisor
- [BueAdJ7NrP](Amazon S3 Bucket Logging (https://docs.aws.amazon.com/awssupport/latest/user/fault-tolerance-checks.html#amazon-s3-bucket-logging)]
- Cloud Conformity
- Internal
dec-x-e0014333
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-e0014333 | 2 |
Logicβ
- π§ prod.logic.yaml π’
- π AWS S3 Bucket
- π AWS S3 Bucket - object.extracts.yaml
- π§ͺ test-data.json
Descriptionβ
Descriptionβ
AWS S3 Server Access Logging enables you to track and analyze access to your S3 buckets, providing detailed records of requests made to the objects.
Rationalβ
When Server Access Logging is enabled for an S3 (source) bucket, Amazon S3 starts to capture access logs and store them in a separate (destination) bucket designated for logging purposes. These logs are typically stored in a standardized format and can be easily analyzed using various AWS tools or third-party services.
The access logs generated by S3 contain information such as:
- Requester's IP Address: The IP address of the entity making the request to access the S3 bucket.
- Request Timestamp: The date and time when the request was made.
- Requested Resource: The specific object within the S3 bucket that was accessed.
- HTTP Method: The method used for the request (e.g., GET, PUT, DELETE).
- Response Status: The HTTP status code returned by S3 in response to the request.
- Bytes Sent/Received: The number of bytes sent from S3 to the requester and received by S3 from the requester.
... see more
Remediationβ
Remediationβ
Prerequisitesβ
- The destination (target) bucket must be in the same AWS Region and AWS account as the source bucket.
- Your destination bucket should not have server access logging enabled.
- S3 buckets that have S3 Object Lock enabled can't be used as destination buckets
- The destination bucket must not have Requester Pays enabled.
- Default server-side encryption with AWS Key Management Service (AWS KMS) keys (SSE-KMS) is not supported.
From Command Lineβ
It's recommended that you create a dedicated logging bucket in each AWS Region that you have S3 buckets in. Then have your Amazon S3 access logs delivered to that S3 bucket. Distinguish buckets from each other by adding a prefix.
Step 1. Grant permissions for server access log delivery by using a bucket policyβ
To grant permissions to the logging service principal, use the
put-bucket-policy
command. Replace{{your-log-destination-bucket}}
with the name of your destination bucket.aws s3api put-bucket-policy --bucket {{your-log-destination-bucket}} --policy file://{{policy.json}}
... [see more](remediation.md)