π‘οΈ AWS ELB Load Balancer Access Logging is disabledπ’
- Contextual name: π‘οΈ Load Balancer Access Logging is disabledπ’
- ID:
/ce/ca/aws/elb/load-balancer-access-logging - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
RELIABILITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- AWS Security Hub: [ELB.5] Application and Classic Load Balancers logging should be enabled
- Cloud Conformity: ELB Access Log
Descriptionβ
Descriptionβ
Ensure that access logging is enabled for Application, Network, and Classic Load Balancers. Access logs capture detailed information about requests processed by the load balancer.
Rationaleβ
When access logging is enabled, load balancer logs are delivered to a designated Amazon S3 bucket. These logs record information about each request, including client IP address, request path, response codes, and latency. Access logs are valuable for analyzing traffic patterns, supporting security investigations, implementing protection and compliance controls, and troubleshooting operational issues.
Impactβ
Enabling access logging may result in additional Amazon S3 storage costs for retaining log files. There is no additional charge for the access logging feature itself.
Auditβ
This policy flags an AWS ELB load balancer as INCOMPLIANT if the
Access Logs Enabledfield is false.Gateway Load Balancers are marked as INAPPLICABLE.
Remediationβ
Remediationβ
Enable Access Loggingβ
Enable access logging for Amazon Elastic Load Balancers to capture detailed request information and store it in Amazon S3 for analysis, auditing, and troubleshooting.
From Command Lineβ
1. Create an Amazon S3 bucket for access logsβ
Create an S3 bucket to store load balancer access logs:
aws s3api create-bucket \
--bucket {{access-logs-bucket-name}} \
--region {{aws-region}}2. Configure the S3 bucket policyβ
Grant the load balancer permission to write access logs to the S3 bucket. Create a file named
access-logging-policy.jsonand replace all placeholders with your own values:{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ELBAccessLoggingPolicy",
"Effect": "Allow",
"Principal": {
"Service": "logdelivery.elasticloadbalancing.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::{{access-logs-bucket-name}}/{{logging-prefix}}/AWSLogs/{{123456789012}}/*"
}
]
}Attach the policy to the S3 bucket:
... see more