Issue while Lambda Promtail try to Get Object to my S3 bucket where reside my logs from my AWS ALB

Hello, I have an ALB that log to a S3 bucket in format .log.gz.

We have deployed the Lambda and the other resources for this tool without problem, the Lambda has the permissions to read object in this bucket, but in the logs when Lambda was invoked, we saw this error:

level=error caller=main.go:207 err=“error processing event: Failed to get object deploy-balancer-test/AWSLogs/12345678901/elasticloadbalancing/eu-west-1/2023/09/22/12345678901_elasticloadbalancing_eu-west-1_app.alb-mytest.d76574bd02d3cbe4_20230922T0640Z_11.222.33.44_4aux4q1z.log.gz from bucket access-log-balancer-alb on account \n, operation error S3: GetObject, https response error StatusCode: 0, RequestID: , HostID: , canceled, context deadline exceeded”

Failed to get object deploy-balancer-test/AWSLogs/12345678901/elasticloadbalancing/eu-west-1/2023/09/22/12345678901_elasticloadbalancing_eu-west-1_app.alb-mytest.d76574bd02d3cbe4_20230922T0640Z_11.222.33.44_4aux4q1z.log.gz from bucket access-log-balancer-alb on account
, operation error S3: GetObject, https response error StatusCode: 0, RequestID: , HostID: , canceled, context deadline exceeded: errorString
null

The ask begin 60 seconds before, the timeout for the execution of the Lambda is 60 seconds, need more time for Lambda execution?, all the files in the bucket have less 1 Mb, so we think that time is not the problem, any other suggestion?

I am facing that error too. But not the same with you. I configured Lambda in my VPC and Subnet and Lambda knows any updates that write to ALB and log to S3. But there is nothing changed in Grafana Cloud. I can’t find the logs in Grafana Cloud. I am not sure what I am missing. ALB - S3 (Enable Access Logs) >>> Lambda trigger to S3. Did you solve that? In my scenario, only ALB can check the health of the Container. So, I want to get ALB Logs to Grafana Cloud when the container fails which generates the error logs from ALB Logs.