exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 123 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 123
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer created a Lambda function for a web application backend. When testing the Lambda function from the AWS Lambda console, the developer can see that the function is being run, but there is no log data being generated in Amazon CloudWatch Logs, even after several minutes.
What could cause this situation?

  • A. The Lambda function does not have any explicit log statements for the log data to send it to CloudWatch Logs.
  • B. The Lambda function is missing CloudWatch Logs as a source trigger to send log data.
  • C. The execution role for the Lambda function is missing permissions to write log data to the CloudWatch Logs.
  • D. The Lambda function is missing a target CloudWatch Log group.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
awscertified
Highly Voted 3 years, 9 months ago
I would say C. The execution role for the Lambda function is missing permissions to write log data to the CloudWatch Logs.
upvoted 31 times
...
Mihai2
Highly Voted 3 years, 8 months ago
A. The Lambda function does not have any explicit log statements for the log data to send it to CloudWatch Logs. -- If lambda was executed, it will always have some logs to send. For example execution time and memory usage will be always send after execution is done. [Incorrect] B. The Lambda function is missing CloudWatch Logs as a source trigger to send log data. -- Lambda is connected to CloudWatch by default and you cannot disable it. [Incorrect] C. The execution role for the Lambda function is missing permissions to write log data to the CloudWatch Logs. -- You have to explicitly define a IAM role with IAM policy which allows Lambda to send logs to CloudWatch. [Correct] D. The Lambda function is missing a target CloudWatch Log group. -- See explanation in answer B. [Incorrect]
upvoted 21 times
tony554556
2 years, 5 months ago
Appreciate that, very clear reasons
upvoted 1 times
...
...
SD_CS
Most Recent 1 year, 5 months ago
Selected Answer: C
C makes most sense
upvoted 1 times
...
rcaliandro
2 years ago
Selected Answer: C
C is correct, lambda needs the permissions to send log to CloudWatch
upvoted 1 times
...
pancman
2 years, 4 months ago
Saw this question on the exam today (Feb 2023)
upvoted 1 times
...
sichilam
2 years, 5 months ago
C is the one
upvoted 1 times
...
habros
2 years, 9 months ago
Selected Answer: C
C. The lambda basic execution role contains permission to write to cw log group.
upvoted 1 times
...
Ivanyan
3 years, 2 months ago
Selected Answer: C
C. The execution role for the Lambda function is missing permissions to write log data to the CloudWatch Logs.
upvoted 1 times
...
xxxdolorxxx
3 years, 8 months ago
I vote C
upvoted 1 times
...
VAG1595
3 years, 8 months ago
Answer: C
upvoted 1 times
...
wils3
3 years, 8 months ago
Ans : C
upvoted 1 times
...
M_S
3 years, 8 months ago
C - Correct link to validate https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html
upvoted 3 times
...
Vishaka1995
3 years, 8 months ago
Correct answer: C
upvoted 1 times
...
codeScalable
3 years, 8 months ago
C is correct
upvoted 1 times
...
saeidp
3 years, 9 months ago
C is correct
upvoted 2 times
...
WilsonNF
3 years, 9 months ago
"C" is correct
upvoted 1 times
...
MFDOOM
3 years, 9 months ago
Ans : C
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...