Home › AWS Developer Associate › cloudcomputing › awsdevtroubleshooting › Where do Lambda function STDOUT and STDERR end u…
Where do Lambda function STDOUT and STDERR end up by default?
AMailed to the AWS root account daily
BAmazon CloudWatch Logs (log group `/aws/lambda/<function-name>`)
CLost — Lambda doesn't persist logs anywhere
DStored in S3 buckets owned by the function's IAM role
Answer & Solution
Correct answer: B. Amazon CloudWatch Logs (log group `/aws/lambda/<function-name>`)
Lambda automatically streams stdout/stderr to CloudWatch Logs under `/aws/lambda/<function-name>`. The other options misstate what Lambda does.
Related questions
A serverless app's Lambda functions are billed per-millisecond. Which cost-optimization stWhich CloudWatch construct sends an SNS notification when a Lambda's error rate exceeds 5%An application sends events to an SQS queue. Suddenly the queue's `ApproximateNumberOfMessA Lambda function in a VPC hits an external HTTPS API. Cold starts now take 8+ seconds insA team needs to query Lambda logs ad-hoc with SQL-like syntax (filter by request id, errorWhich CloudWatch feature lets a developer build a dashboard showing graphs of multiple metA Lambda function called from API Gateway returns 502 Bad Gateway under load. Logs show "TA Lambda function's 99th-percentile latency is dominated by cold starts. Which optimisatio