Member-only story
AWS — Storing EC2 Load Balancer logs in S3 bucket
Setting the right S3 Bucket policy — save your time, read this article
TL;DR;
Setting up the S3 bucket is straightforward. Locating the S3 URI in the Load Balancer isn’t difficult either. But setting the right bucket policy so that the LB has the permission to upload log files to the bucket may be tricky.
If that’s what troubles you, skip ahead and copy the sample policy bucket and be done with it.
Otherwise, read on.
Demo
Setting up S3 bucket
Once you have an S3 bucket created, create a folder (or two if you want to store both access and connection logs to the bucket).

Setting up EC2 Load Balancer
You can set up a Load Balancer with an EC2 Auto Scaling Group by following the detailed instruction in the article below: