Network Load Balancers produce access logs for TLS listeners only. Each entry records a TLS connection: listener, client and destination addresses, connection and handshake times, bytes, cipher, and protocol version. NLB access logs have no HTTP request line or status code.
Load balancers deliver these logs as CloudWatch vended logs, set up on the load balancer’s Integrations tab. They can go to CloudWatch Logs, Amazon Data Firehose, or Amazon S3, with a choice of output format.
Recommended method
Amazon Data Firehose — deliver the logs as vended logs straight to a Firehose stream with the Bronto HTTP endpoint destination. No Lambda is needed.- Create the Firehose stream as described in Amazon Data Firehose setup. Set
x-bronto-datasetin the stream’s Parameters to choose the dataset. - Open the load balancer in the EC2 console and choose the Integrations tab.
- Add a log delivery for each log type you want, with your Firehose stream as the destination.
- Set Output format to JSON.
The output format is fixed when the delivery destination is created. To change it, delete the delivery and create a new one.
Migrating from legacy S3 access logs. If a load balancer still writes access logs to S3 from its Attributes tab, AWS now calls that delivery legacy. Set up the Firehose delivery above, then turn off the legacy logging. Until you do, the S3 Log Forwarder can keep reading the existing bucket with
log_type set to alb_access_log or nlb_access_log.