Question 1,408 of 1,738
Infrastructure SecuritymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the second statement in the SQS queue policy allows any principal within the 10.0.0.0/8 IP range to receive messages from the queue, which directly violates the security requirement that only the SNS topic should send messages. This is incorrect because the policy should restrict the `sqs:SendMessage` action exclusively to the SNS topic using a condition like `aws:SourceArn`, while the broad `Effect: Allow` for `sqs:ReceiveMessage` opens up receive access to an entire IP block without restricting the principal or source. On the AWS Certified Security Specialty SCS-C02 exam, this scenario tests your ability to spot overly permissive resource-based policies, especially when a service like SNS is the only intended sender. A common trap is focusing only on the SendMessage action and overlooking a separate, broad ReceiveMessage statement that grants unintended access. Memory tip: always check both send and receive actions in a queue policy—if one is tightly scoped and the other is wide open, the policy is broken.

SCS-C02 Infrastructure Security Practice Question

This SCS-C02 practice question tests your understanding of infrastructure security. 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",
      "Principal": "*",
      "Action": "sqs:SendMessage",
      "Resource": "arn:aws:sqs:us-east-1:123456789012:MyQueue",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sns:us-east-1:123456789012:MyTopic"
        }
      }
    },
    {
      "Effect": "Allow",
      "Principal": "*",
      "Action": "sqs:ReceiveMessage",
      "Resource": "arn:aws:sqs:us-east-1:123456789012:MyQueue",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "10.0.0.0/8"
        }
      }
    }
  ]
}

A security engineer is reviewing the SQS queue policy shown in the exhibit. The queue is subscribed to an SNS topic in the same account. The security team has a requirement that only the SNS topic should be allowed to send messages to the queue. What is the issue with this policy?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": "*",
      "Action": "sqs:SendMessage",
      "Resource": "arn:aws:sqs:us-east-1:123456789012:MyQueue",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sns:us-east-1:123456789012:MyTopic"
        }
      }
    },
    {
      "Effect": "Allow",
      "Principal": "*",
      "Action": "sqs:ReceiveMessage",
      "Resource": "arn:aws:sqs:us-east-1:123456789012:MyQueue",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "10.0.0.0/8"
        }
      }
    }
  ]
}

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The second statement allows any principal in the 10.0.0.0/8 range to receive messages from the queue.

Option A is correct because the second statement in the SQS queue policy allows any principal in the 10.0.0.0/8 IP range to receive messages from the queue, which violates the security requirement that only the SNS topic should be allowed to send messages. The policy should restrict the `sqs:SendMessage` action to the SNS topic using a condition like `aws:SourceArn` and should not include a broad `Effect: Allow` for `sqs:ReceiveMessage` without restricting the principal or source.

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 second statement allows any principal in the 10.0.0.0/8 range to receive messages from the queue.

    Why this is correct

    This is overly permissive and should be scoped down.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The policy does not specify a principal, so it will not work.

    Why it's wrong here

    Principal '*' is allowed when used with conditions.

  • The aws:SourceArn condition uses ArnLike which is deprecated.

    Why it's wrong here

    ArnLike is valid and commonly used.

  • The aws:SourceIp condition cannot be used with SQS queue policies.

    Why it's wrong here

    aws:SourceIp can be used with SQS.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may focus on the `aws:SourceArn` condition or the lack of a principal, overlooking the fact that the second statement grants broad receive access to any IP in the 10.0.0.0/8 range, which violates the requirement to restrict message sending to only the SNS topic.

Detailed technical explanation

How to think about this question

SQS queue policies use AWS IAM policy syntax, where the `Principal` element can be omitted when the policy is attached to the queue, defaulting to `*` (all principals). The `aws:SourceArn` condition with `ArnLike` is used to restrict the source ARN of the request, such as an SNS topic, and is not deprecated. The `aws:SourceIp` condition is valid for SQS but is typically used for VPC-based access control, not for restricting SNS-to-SQS subscriptions.

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 cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

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.

Related practice questions

Related SCS-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SCS-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SCS-C02 question test?

Infrastructure Security — This question tests Infrastructure Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The second statement allows any principal in the 10.0.0.0/8 range to receive messages from the queue. — Option A is correct because the second statement in the SQS queue policy allows any principal in the 10.0.0.0/8 IP range to receive messages from the queue, which violates the security requirement that only the SNS topic should be allowed to send messages. The policy should restrict the `sqs:SendMessage` action to the SNS topic using a condition like `aws:SourceArn` and should not include a broad `Effect: Allow` for `sqs:ReceiveMessage` without restricting the principal or source.

What should I do if I get this SCS-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 →

How Courseiva writes practice questions · Editorial policy

Keep practising

More SCS-C02 practice questions

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

This SCS-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 SCS-C02 exam.