Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AWS Certified Security - Specialty SCS-C02 topic 1 question 59 discussion

A security engineer logs in to the AWS Lambda console with administrator permissions. The security engineer is trying to view logs in Amazon CloudWatch for a Lambda function that is named myFunction. When the security engineer chooses the option in the Lambda console to view logs in CloudWatch, an "error loading Log Streams" message appears.
The IAM policy for the Lambda function's execution role contains the following:

How should the security engineer correct the error?

  • A. Move the logs:CreateLogGroup action to the second Allow statement.
  • B. Add the logs:PutDestination action to the second Allow statement.
  • C. Add the logs:GetLogEvents action to the second Allow statement.
  • D. Add the logs:CreateLogStream action to the second Allow statement.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
icecool36
2 months, 2 weeks ago
Not C: It is about the function role policy, not the engineer role policy
upvoted 1 times
...
icecool36
2 months, 2 weeks ago
Selected Answer: D
Needs to be able to create a logstream
upvoted 2 times
...
minTwin
3 months ago
Selected Answer: C
While logs:CreateLogStream might be needed by the Lambda function itself to write logs initially, the prompt emphasizes viewing logs, which requires logs:GetLogEvents.
upvoted 1 times
...
Sodev
3 months, 3 weeks ago
D. View Lambda logs on Lambda console, not same mean with: Lambda need to fetch logs from CW. That's only a AWS UI feature, a CW log frame in Lambda UI.
upvoted 1 times
...
Raphaello
5 months, 1 week ago
Selected Answer: D
Action "logs:GetLogEvents" gets log events from log stream (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html), but there no log stream on first place! Correct answer is allowing the function to create log stream (through logs:CreateLogStream). D.
upvoted 2 times
...
mynickc
6 months ago
Selected Answer: D
putlogevent require logstream. so it is createlogstream. https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/permissions-reference-cwl.html
upvoted 1 times
...
Gafa255
6 months ago
Selected Answer: C
C is correct options because Security Engineer wants to see LOG. logs:GetLogEvents https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-identity-based-access-control-cwl.html
upvoted 1 times
Gafa255
6 months ago
Sorry the correct options is D because the issue is when the Lambda function want to create the streams.
upvoted 1 times
...
...
marlonchin
8 months ago
D I don't think adding logs is not the responsibility of the Lamda function here
upvoted 1 times
...
[Removed]
8 months, 1 week ago
Seems poorly written to me.. The engineer is trying to view the logs. So they'll need "logs:GetLogEvents " permission. However the policy is also missing "logs:CreateLogStream" so they will also need that in order for the Lambda to "create a new log stream". Doubt something this bad will be on the exam
upvoted 1 times
...
YR4591
8 months, 1 week ago
Selected Answer: D
When creating log group, there should be a permission to put log streams in the log group
upvoted 2 times
...
kejam
8 months, 2 weeks ago
Selected Answer: C
Answer C. The security engineer wants to view logs in CloudWatch. A. logs:CreateLogGroup - Required to create a new log group B. logs:PutDestination - Required to create or update a destination log stream C. Add the logs:GetLogEvents - Required to retrieve log events from a log stream D. Add the logs:CreateLogStream - Required to create a new log stream in a log group https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/permissions-reference-cwl.html
upvoted 1 times
Aamee
7 months, 3 weeks ago
But w/o creating the LogStream, how can the PutLogStream going to work from option C?.. that looks missing to me though..
upvoted 1 times
...
...
100fold
9 months, 1 week ago
Selected Answer: D
Answer D https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-identity-based-access-control-cwl.html
upvoted 3 times
...
kk2000
9 months, 3 weeks ago
Correct Answer is D
upvoted 3 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 ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in