Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws network elb not generating logs

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

{
    "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 ?

like image 398
roy Avatar asked Apr 17 '19 18:04

roy


People also ask

How do I know if NLB is working?

Go to the command prompt and type "wlbs query", as you can see HOST 1 and HOST 2 converged successfully on the cluster. This means things are working well. Ping each server locally and remotely. Ping the virtual IP locally and remotely, you should do this three times to test the NLB working.


1 Answers

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.

like image 134
roy Avatar answered Oct 12 '22 08:10

roy