The issue is that the resource ARN in the Lambda CloudWatch Logs IAM policy is missing a log-stream component, which prevents the `logs:PutLogEvents` action from succeeding. While the policy correctly grants `logs:CreateLogGroup`, `logs:CreateLogStream`, and `logs:PutLogEvents` on the ARN `arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:*`, this wildcard only covers log streams at the group level, not a specific stream target. The `logs:PutLogEvents` API call requires a resource ARN that explicitly includes a log-stream element, such as `arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:log-stream:*`, because the write operation is directed at an individual stream within the group. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding of IAM policy resource-level specificity for CloudWatch Logs, a common trap where candidates assume a single wildcard covers all sub-resources. Remember the mnemonic: "PutLogEvents needs a stream in its dreams"—the ARN must name the log-stream component for write permissions to work.
SOA-C02 Monitoring, Logging, and Remediation Practice Question
This SOA-C02 practice question tests your understanding of monitoring, logging, and remediation. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "logs:PutLogEvents",
"Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:*"
}
]
}
Refer to the exhibit. A Lambda function is unable to write logs to CloudWatch Logs. The IAM role attached to the Lambda function includes the policy shown. What is the issue?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The resource ARN does not include a log-stream component.
The Lambda function's IAM policy grants permissions for `logs:CreateLogGroup`, `logs:CreateLogStream`, and `logs:PutLogEvents` on the resource ARN `arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:*`. However, this ARN only specifies the log group and a wildcard for log streams, which is insufficient for the `logs:PutLogEvents` action. The `logs:PutLogEvents` action requires a resource ARN that includes a specific log-stream component (e.g., `arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:log-stream:*`), because the API call targets a particular log stream within the log group. Without this, the Lambda function cannot write logs, resulting in a permissions error.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The log group name is incorrect.
Why it's wrong here
The log group name appears correct.
✗
The policy effect is Deny.
Why it's wrong here
The effect is Allow.
✗
The 'logs:PutLogEvents' action is not allowed.
Why it's wrong here
The action is allowed.
✓
The resource ARN does not include a log-stream component.
Why this is correct
PutLogEvents requires a log-stream in the resource ARN.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume a wildcard on the log group ARN (e.g., `log-group:*`) covers all actions, but AWS requires the log-stream component for write operations like `PutLogEvents`, causing a subtle permissions failure.
Detailed technical explanation
How to think about this question
Under the hood, CloudWatch Logs API calls like `PutLogEvents` are made against a specific log stream, not the log group itself. The IAM policy resource ARN must include the log-stream component (e.g., `log-stream:*`) to match the resource targeted by the API request. In real-world scenarios, if you use a wildcard for the log group only (e.g., `log-group:*`), actions like `CreateLogGroup` and `CreateLogStream` will work, but `PutLogEvents` will fail because the API call resolves to a log stream ARN that the policy does not cover.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Monitoring, Logging, and Remediation — This question tests Monitoring, Logging, and Remediation — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The resource ARN does not include a log-stream component. — The Lambda function's IAM policy grants permissions for `logs:CreateLogGroup`, `logs:CreateLogStream`, and `logs:PutLogEvents` on the resource ARN `arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:*`. However, this ARN only specifies the log group and a wildcard for log streams, which is insufficient for the `logs:PutLogEvents` action. The `logs:PutLogEvents` action requires a resource ARN that includes a specific log-stream component (e.g., `arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/MyFunction:log-stream:*`), because the API call targets a particular log stream within the log group. Without this, the Lambda function cannot write logs, resulting in a permissions error.
What should I do if I get this SOA-C02 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.