1

AWS somehow aggregate stdout and stderr of a lambda. I once bumped to a situation where a subthread of a lambda process stopped logging in the middle(using async technology was such a bad idea). I'm curious who aggregate the logs. Is there some kind of CloudWatch Agent in the runtime of lambda or is the aggregator located in AWS side?

1 Answers1

3

Lambda runs using a service linked role that gives it permission to write to CloudWatch logs. You will have created this role, or used the GUI to give lambda permission to create the role on your behalf.

Given that lambda has permission, it's part of the service that logs are written to CloudWatch logs.

Someone who does more Lambda might give you a better answer or correct me, but pretty sure this is right. AWS uses service linked roles all over the place.

Tim
  • 30,383
  • 6
  • 47
  • 77