Control: 5 Application and Classic Load Balancers logging should be enabled
Description
This control checks whether the Application Load Balancer and the Classic Load Balancer have logging enabled. The control fails if access_logs.s3.enabled is false.
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 and to troubleshoot issues.
Remediation
To remediate this issue, update your load balancers to enable logging.
To enable access logs
- Open the Amazon EC2 console.
- In the navigation pane, choose
Load balancers
. - Choose an Application Load Balancer.
- From
Actions
, chooseEdit attributes
. - Under
Access logs
, chooseEnable
. - Enter your S3 location. This location can exist or it can be created for you. If you do not specify a prefix, the access logs are stored in the root of the S3 bucket.
- Choose
Save
.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.foundational_security_elb_5
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.foundational_security_elb_5 --share
SQL
This control uses a named query:
elb_application_classic_lb_logging_enabled