Is AWS Lambda CloudWatch logging synchronous?
AWS recommends that AWS Lambda should log to CloudWatch from where it can be streamed to multiple places if need be.
I couldn't think of a good way to test this, hence the question.
If it is synchronous:
1) What's the latency / KB?
If its asynchronous:
1) When the Lambda function has done its job (returned response to caller) AWS documentation says it can be destroyed anytime to scale down or to simply get replaced by another instance for whatever reason, if its indeed asynchronous, then how does AWS gurantee that the logs will not be lost?
UPDATE: I found that no matter what language we are talking about, Lambda is ultimately writing to the console (console.log in node.js, Console.Writeline in C#), I imagine AWS takes it from the console and puts it in Cloudwatch. This just makes me more confused, if anybody can point me to data flow diagram, it would be awesome.