Overview
Overview
Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer. Each log contains information such as the time the request was received, the client's IP address, latencies, request paths, and server responses. You can use these access logs to analyze traffic patterns, troubleshoot issues, and take incident response actions.
Remediation guidance
Enable access logging for the affected load balancer and send logs to an S3 bucket in the same AWS Region.
AWS CLI
aws elbv2 modify-load-balancer-attributes \
--load-balancer-arn {{asset.idFromProvider}} \
--attributes Key=access_logs.s3.enabled,Value=true Key=access_logs.s3.bucket,Value={{manual.logBucket}} Key=access_logs.s3.prefix,Value={{manual.logPrefix}}
Validation
aws elbv2 describe-load-balancer-attributes \
--load-balancer-arn {{asset.idFromProvider}}
Notes:
- The S3 bucket must be in the same Region as the load balancer.
- Ensure the bucket policy allows Elastic Load Balancing to write logs.
References
- https://docs.aws.amazon.com/elasticloadbalancing/latest/application/enable-access-logging.html
- https://docs.aws.amazon.com/cli/latest/reference/elbv2/modify-load-balancer-attributes.html
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
AWS
Use AWS Organizations guardrails, AWS Config rules or conformance packs where they fit, approved account baselines, and IaC modules so new resources inherit the secure setting.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
Access Logs is Enabled for ELB
Connectors
Covered asset types
Expected check: eq []
{loadBalancers(where:{type:"application",hasLoadBalancerAttribute_NONE:{key:"access_logs.s3.enabled",value:"true"}}){...AssetFragment}}
AWS