0 votes
in AWS by

You've developed a Lambda function and now want to debug it, after the execution completes. You add the necessary print statements in the code to assist in the debugging process.

You go to Cloudwatch logs but there are no logs for the Lambda function. Which of the following could be the underlying issue for this?

1 Answer

0 votes
by

Answer - B.

The AWS Documentation mentions the following.

Note.

"If your Lambda function code is executing, but you don't see any log data being generated after several minutes, this could mean your execution role for the Lambda function did not grant permissions to write log data to CloudWatch Logs.

For information about how to make sure that you have set up the execution role correctly to grant these permissions, see Manage Permissions: Using an IAM Role (Execution Role)".

Option A is incorrect since versioning will not help in this case.

Options C and D are incorrect since these were the cases if the function would not complete execution, but the question says debugging starts after the execution is completed.

...