I'm trying to find a solution to extract ALB logs file in .gz format when they're uploaded automatically from ALB to S3.
My bucket structure is like this
/log-bucket ..alb-1/AWSLogs/account-number/elasticloadbalancing/ap-northeast-1/2018/log.gz ..alb-2/AWSLogs/account-number/elasticloadbalancing/ap-northeast-1/2018/log.gz ..alb-3/AWSLogs/account-number/elasticloadbalancing/ap-northeast-1/2018/log.gz Basically, every 5 minutes, each ALB would automatically push logs to correspond S3 bucket. I'd like to extract new .gz files right at that time in same bucket.
Is there any ways to handle this?
I noticed that we can use Lambda function but not sure where to start. A sample code would be greatly appreciated!