ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 329 - SOA-C02 discussion

Report
Export

A development team created and deployed a new AWS Lambda function 15 minutes ago. Although the function was invoked many times. Amazon CloudWatch Logs are not showing any log messages.

What is one cause of this?

A.
The developers did not enable log messages for this Lambda function.
Answers
A.
The developers did not enable log messages for this Lambda function.
B.
The Lambda function's role does not include permissions to create CloudWatch Logs items.
Answers
B.
The Lambda function's role does not include permissions to create CloudWatch Logs items.
C.
The Lambda function raises an exception before the first log statement has been reached.
Answers
C.
The Lambda function raises an exception before the first log statement has been reached.
D.
The Lambda functions creates local log files that have to be shipped to CloudWatch Logs first before becoming visible.
Answers
D.
The Lambda functions creates local log files that have to be shipped to CloudWatch Logs first before becoming visible.
Suggested answer: B

Explanation:

If AWS Lambda function logs are not appearing in Amazon CloudWatch, it is typically due to insufficient permissions:

IAM Role Permissions: The execution role assigned to the Lambda function must have the necessary permissions to interact with CloudWatch Logs. This includes actions like logs:CreateLogGroup, logs:CreateLogStream, and logs:PutLogEvents.

Check and Update Role: Verify that the IAM role used by the Lambda function includes a policy granting these permissions. If not, update the role to include these permissions.

Log Group and Stream: With the appropriate permissions, the Lambda function will be able to create or use a log group and stream in CloudWatch Logs and publish log messages accordingly.

Ensuring the Lambda function has the correct permissions is essential for diagnostics and monitoring, allowing log data to be captured and reviewed in CloudWatch Logs.

asked 16/09/2024
Daniel Yamamoto
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first