Other Articles
- IAM - Enable User MFA
- IAM - Enforce Key Rotation
- IAM - Enforce Active Key Limit
- IAM - Disable Unused User Credentials
- IAM - Enforce Group Permission
- IAM - Enforce Password Length
- IAM - Prohibit Password Reuse
- IAM - Check Root Access Keys Existence
- IAM - Enable Root MFA
- IAM - Establish Support Role
- IAM - Enable Key Rotation
- Purge Expired Certificates
- EC2 Volume – Enable EBS Volume Backup
- EC2 Volume – Enable EBS Encryption
- EFS – Enable EFS Storage Backup
- S3 Bucket – Enable S3 Bucket Versioning
- S3 Bucket – Enable S3 Bucket Encryption
- S3 Bucket – Block S3 Bucket Public Access
- RDS DB Instance – Encryption of Storage
- RDS DB Instance – Enable Deletion Protection
- RDS DB Instance – Enable Auto Minor Version Upgrade
- DynamoDB Table – Enable Table Encryption
- DynamoDB Table – Enable Table Point In Time Recovery
- DynamoDB Table – Enable Table Deletion Protection
- EKS Cluster – Enable Secrets Encryption
- OpenSearch Domain – Enable Encryption at Rest
- RDS DB Cluster – Retain Backups for 7 Days
- RDS DB Cluster – Encryption of Storage
- RDS DB Cluster – Enable Deletion Protection
- EC2 Instance – Monitor CPU Utilization
- ECS Service – Monitor CPU Utilization
- ECS Service – Monitor Memory Utilization
- RDS DB Instance – Monitor Free Storage Space
- RDS DB Instance – Monitor CPU Utilization
- SQS Queue – Monitor Message Age
- SQS Queue – Monitor Message Visibility
- DynamoDB Table – Monitor Table Read Capacity
- DynamoDB Table – Monitor Table Write Capacity
- DynamoDB Table – Monitor Table Latency
- Enable CloudTrail
- Encrypt CloudTrail Logs
- EC2 VPC – Ensure Flow Logs are Enabled
- EKS Cluster – Enable Control Plane Logging
- CloudWatch Log Group – Enable KMS Encryption
- CloudWatch Log Group – Configure Retention
- RDS DB Instance – Block Public Access
- EC2 Security Group – Restrict Public SSH and RDP Access
- EC2 Security Group – Restrict Public Database Access
- EKS Cluster – Restrict Public Endpoint
- EC2 VPC – Restrict Default Security Group Traffic
- Load Balancer – Redirect HTTP Traffic to HTTPS
- Load Balancer – Use Strong TLS Policies
- OpenSearch Domain – Enable Node-to-Node Encryption
- OpenSearch Domain – Enforce HTTPS
- OpenSearch Domain – Restrict Public Access
- RDS DB Cluster – Block Public Access
- EC2 Instance – Enable Deletion Protection
- ECS Service – Enable Auto Scaling
- Load Balancer – Enable Deletion Protection
- Enable AWS Security Hub
- Enable GuardDuty
- CloudFront Distribution – Enforce HTTPS for Viewers
- CloudFront Distribution – Require TLS 1.2 for Viewers
- CloudFront Distribution – Associate a WAF Web ACL
- CloudFront Distribution – Protect S3 Origin Access
- KMS Key – Avoid Pending Deletion
- SNS Topic – Enable Encryption
- SNS Topic – Restrict Topic Policy Access
Load Balancer – Enable Access Logs
Secure Configuration Checks > AWS
This check ensures that access logs are enabled for Application Load Balancers and Network Load Balancers. Access logs record each request or connection that reaches the load balancer, such as the client IP address, the time and the response. Without them, you cannot trace attacks, investigate incidents or show who accessed your applications.
Check Details
- Resource: Application Load Balancer and Network Load Balancer
- Check: Enable load balancer access logs (
AccessLogsEnabled) - Risk: Malicious or unusual traffic leaves no record, and incident response has no request-level evidence
Where access logs can be sent
- Amazon S3: Works for Application and Network Load Balancers. Low cost, and you can query the logs with Amazon Athena.
- Amazon CloudWatch Logs: Works for Application Load Balancers only, through vended log delivery. Good for searching and alarms.
Remediation via AWS Console
-
Log in to the AWS Management Console and open the Amazon EC2 console.
- In the left navigation pane, under Load Balancing, click Load Balancers and select the affected load balancer.
-
Open the Attributes tab and click Edit.
-
Turn on Access logs. Enter the S3 location, for example
s3://<bucket-name>/<prefix>. To let AWS create the bucket and its policy, select Create this location for me.
- Click Save changes.
- Repeat steps 2 to 5 for every Application and Network Load Balancer without access logs.
Remediation via AWS CLI
-
Log in to the AWS Management Console and click the CloudShell icon (
>_) in the top-right corner.
-
List the Application and Network Load Balancers that do not send access logs to S3:
for arn in $(aws elbv2 describe-load-balancers \ --query 'LoadBalancers[?Type==`application` || Type==`network`].LoadBalancerArn' \ --output text); do aws elbv2 describe-load-balancer-attributes \ --load-balancer-arn "$arn" \ --query "Attributes[?Key=='access_logs.s3.enabled'].Value" \ --output text | grep -qx true || echo "$arn" doneThe command covers one region. Add
--region <region>to eachawscommand to check another. An Application Load Balancer that delivers logs only to CloudWatch Logs is also listed. Skip it if you have confirmed that delivery. -
Allow the load balancer service to write to the bucket. Skip this step if the bucket already has a suitable policy:
cat > policy.json <<'EOF' { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::<elb-account-id>:root"}, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<bucket-name>/<prefix>/AWSLogs/<account-id>/*" } ] } EOF aws s3api put-bucket-policy \ --bucket <bucket-name> \ --policy file://policy.jsonThe
<elb-account-id>depends on the region. Find it in the AWS documentation for load balancer access logs. Regions opened after August 2022 use a service principal instead of an account ID, and Network Load Balancers use a different policy. The console option Create this location for me handles all of these cases. -
Enable access logs:
aws elbv2 modify-load-balancer-attributes \ --load-balancer-arn <load-balancer-arn> \ --attributes \ Key=access_logs.s3.enabled,Value=true \ Key=access_logs.s3.bucket,Value=<bucket-name> \ Key=access_logs.s3.prefix,Value=<prefix>
-
Verify the access log attributes:
aws elbv2 describe-load-balancer-attributes \ --load-balancer-arn <load-balancer-arn> \ --query "Attributes[?starts_with(Key, 'access_logs')]" \ --output table
The value of
access_logs.s3.enabledmust betrue. Log files can take several minutes to appear in the bucket.
Replace <load-balancer-arn> with the ARN of the load balancer.
Replace <bucket-name> and <prefix> with your S3 bucket and a folder name, and <account-id> with your 12-digit AWS account ID.
Repeat steps 3 and 4 for each load balancer, or for each bucket you use.
Updated on 04 November, 2026