I am using lambda-promtail to ingests logs from s3 into Loki. I am ingesting log lines in batches. batch size is 4MB. But when log file is very large.
Lambda promtail source code is in Golang. But I have written it in python. When number of log lines are very large lambda is getting timed out.
So just increase Lambda timeout.
cannot increase more than 15 mins
So increase memory - more memory => more CPU for processing and find which part of your Lambda is so slow.