Elastic Load Balancer has access logs to S3 configured
Elastic Load Balancers have access logs configured to deliver request metadata (client IPs, paths, status, TLS details) to Amazon S3
Risk
Without ELB access logs, you lose visibility into edge traffic, reducing detection of reconnaissance, brute-force, and exploitation attempts. This hampers forensics and incident timelines, risking undetected data exfiltration (confidentiality), untraceable changes (integrity), and delayed response to outages or DDoS (availability).
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks elb_logging_enabledRecommendation
Enable access logs to Amazon S3 (access_logs.s3.enabled=true). Apply least privilege bucket policies, encrypt objects, and restrict read access. Define lifecycle retention and centralize analysis. Monitor for delivery failures and alert on anomalies. Standardize across all load balancers via IaC as part of defense in depth.
Remediation
CLI
aws elb modify-load-balancer-attributes --load-balancer-name <lb_name> --load-balancer-attributes AccessLog={Enabled=true,S3BucketName=<bucket_name>}Terraform
# Enable access logs for an ELBv2 load balancer (minimal)
resource "aws_lb" "<example_resource_name>" {
load_balancer_type = "network"
subnets = ["<example_resource_id>", "<example_resource_id>"]
access_logs { # CRITICAL: Enables S3 access logs
bucket = "<example_resource_name>" # CRITICAL: S3 bucket for logs
enabled = true # CRITICAL: Turn on access logging
}
}NativeIaC
# CloudFormation: Enable access logs for a Classic Load Balancer (CLB)
Resources:
<example_resource_name>:
Type: AWS::ElasticLoadBalancing::LoadBalancer
Properties:
Listeners:
- LoadBalancerPort: 80
InstancePort: 80
Protocol: HTTP
AvailabilityZones:
- <example_resource_id>
AccessLoggingPolicy: # CRITICAL: Enables S3 access logs
Enabled: true # CRITICAL: Turn on access logging
S3BucketName: <example_resource_name> # CRITICAL: S3 bucket to store logsOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.elb.elb_client import elb_client
class elb_logging_enabled(Check):
def execute(self):
findings = []
for lb in elb_client.loadbalancers.values():
report = Check_Report_AWS(metadata=self.metadata(), resource=lb)
report.status = "FAIL"
report.status_extended = (
f"ELB {lb.name} does not have access logs configured."
)
if lb.access_logs:
report.status = "PASS"
report.status_extended = (
f"ELB {lb.name} has access logs to S3 configured."
)
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/elasticloadbalancing/latest/network/enable-access-logs.html
- https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/ElasticBeanstalk/enable-access-logs.html
- https://docs.aws.amazon.com/elasticloadbalancing/latest/application/enable-access-logging.html