Question:
I am trying to configure access logs for AWS Network ELB following this doc https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-access-logs.html
I specified bucket name & prefix, then selected Create this location for me
Following bucket policy was auto generated for the bucket
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
{ "Version": "2012-10-17", "Id": "AWSConsole-AccessLogs-Policy-xxxxxxxxxxxxx", "Statement": [ { "Sid": "AWSConsoleStmt-xxxxxxxxxxxxx", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::xxxxxxxxxxxx:root" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::bucket_name/prefix/AWSLogs/123456789012/*" }, { "Sid": "AWSLogDeliveryWrite", "Effect": "Allow", "Principal": { "Service": "delivery.logs.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::bucket_name/prefix/AWSLogs/123456789012/*", "Condition": { "StringEquals": { "s3:x-amz-acl": "bucket-owner-full-control" } } }, { "Sid": "AWSLogDeliveryAclCheck", "Effect": "Allow", "Principal": { "Service": "delivery.logs.amazonaws.com" }, "Action": "s3:GetBucketAcl", "Resource": "arn:aws:s3:::bucket_name" } ] } |
Bucket is created, but under AWSLogs/xxxxxxxx
there aren’t any log files generated. Anything I am missing here ?
Answer:
From : https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-access-logs.html
Access logs are created only if the load balancer has a TLS listener
and they contain information only about TLS requests.