Monitoring, Logging, Analysis, Remediation, and Performance Optimization
An AWS Lambda function runs successfully but produces no CloudWatch Logs entries despite writing application messages. Its execution role has no logging permissions. What should the operator do?
Show the answer
Correct answerA. Attach AWSLambdaBasicExecutionRole to the execution role.
AWhy this is right: This AWS managed policy grants the execution role the permissions needed to publish Lambda logs.
BWhy not this: SNS invocation permission controls who can invoke the function, not whether the function can publish logs.
CWhy not this: Lambda sends application output to CloudWatch Logs without requiring a CloudWatch agent.
DWhy not this: Lambda data events record invocation activity rather than application log messages.
AWSLambdaBasicExecutionRole grants permissions to create CloudWatch Logs log groups and streams and publish log events. CloudTrail Lambda data events record invocation activity, not application messages.