Question 17 of 1,738
Infrastructure SecurityhardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the Deny statement uses StringNotEquals, which inadvertently allows the deletion of Production volumes. This is a classic IAM policy condition logic error: StringNotEquals denies access only when the tag value does NOT match the specified value, so it denies deletion for non-Production volumes while permitting deletion for Production volumes. To properly block deletion of Production volumes, the condition should use StringEquals, which denies the action only when the tag matches. On the AWS Certified Security Specialty SCS-C02 exam, this scenario tests your understanding of how condition operators evaluate against resource tags—a common trap where candidates assume StringNotEquals denies the specified value rather than everything else. Remember the memory tip: “StringNotEquals denies the opposite, not the target.”

SCS-C02 Infrastructure Security Practice Question

This SCS-C02 practice question tests your understanding of infrastructure security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. 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": "ec2:*",
            "Resource": "*"
        },
        {
            "Effect": "Deny",
            "Action": "ec2:DeleteVolume",
            "Resource": "arn:aws:ec2:us-east-1:123456789012:volume/*",
            "Condition": {
                "StringNotEquals": {
                    "ec2:ResourceTag/Environment": "Production"
                }
            }
        }
    ]
}
```

A security engineer is reviewing an IAM policy attached to a user. The policy is intended to allow all EC2 actions except deleting volumes in the Production environment. However, the user reports being able to delete volumes that are tagged with Environment=Production. What is the reason for this behavior?

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "ec2:*",
            "Resource": "*"
        },
        {
            "Effect": "Deny",
            "Action": "ec2:DeleteVolume",
            "Resource": "arn:aws:ec2:us-east-1:123456789012:volume/*",
            "Condition": {
                "StringNotEquals": {
                    "ec2:ResourceTag/Environment": "Production"
                }
            }
        }
    ]
}
```

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 condition in the Deny statement uses StringNotEquals, which denies deletion for non-Production volumes, not Production volumes.

Option C is correct because the Deny statement denies delete volume only when the tag is NOT Production, meaning it denies deleting non-Production volumes, but allows deleting Production volumes. The condition should be StringEquals to deny Production volumes. Option A is wrong because wildcard does not affect this. Option B is wrong because the policy is for EC2, not IAM. Option D is wrong because the policy is attached to the user.

Key principle: ACLs process entries top to bottom and stop at the first match. Entry order and interface direction matter as much as the permit or deny statement.

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 policy is not attached to the correct IAM entity.

    Why it's wrong here

    The policy is attached to the user as stated.

  • The Deny statement should use iam:ResourceTag instead of ec2:ResourceTag.

    Why it's wrong here

    The correct prefix is ec2 for EC2 resources.

  • The condition in the Deny statement uses StringNotEquals, which denies deletion for non-Production volumes, not Production volumes.

    Why this is correct

    The condition StringNotEquals denies when the tag is not equal to Production, so it denies non-Production volumes, allowing Production volumes to be deleted.

    Related concept

    Standard ACLs match source addresses.

  • The Allow statement uses a wildcard for the action, which overrides the Deny statement.

    Why it's wrong here

    Explicit Deny overrides Allow.

Common exam traps

Common exam trap: ACLs stop at the first match

ACLs are processed top to bottom. The first matching entry wins, and an implicit deny usually exists at the end.

Detailed technical explanation

How to think about this question

ACL questions test precision: source, destination, protocol, port and direction. A generally correct ACL can still fail if it is applied on the wrong interface or in the wrong direction.

KKey Concepts to Remember

  • Standard ACLs match source addresses.
  • Extended ACLs can match source, destination, protocol and ports.
  • The first matching ACL entry is used.
  • There is usually an implicit deny at the end.

TExam Day Tips

  • Check inbound versus outbound direction.
  • Read the ACL from top to bottom.
  • Look for a broader permit or deny above the intended line.

Key takeaway

ACLs process entries top to bottom and stop at the first match. Entry order and interface direction matter as much as the permit or deny statement.

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.

Review ACL processing order, placement rules (standard near destination, extended near source), and inbound vs outbound direction. Study wildcard masks and implicit deny. Then practise related SCS-C02 ACL questions on filtering logic and placement.

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 — Standard ACLs match source addresses..

What is the correct answer to this question?

The correct answer is: The condition in the Deny statement uses StringNotEquals, which denies deletion for non-Production volumes, not Production volumes. — Option C is correct because the Deny statement denies delete volume only when the tag is NOT Production, meaning it denies deleting non-Production volumes, but allows deleting Production volumes. The condition should be StringEquals to deny Production volumes. Option A is wrong because wildcard does not affect this. Option B is wrong because the policy is for EC2, not IAM. Option D is wrong because the policy is attached to the user.

What should I do if I get this SCS-C02 question wrong?

Review ACL processing order, placement rules (standard near destination, extended near source), and inbound vs outbound direction. Study wildcard masks and implicit deny. Then practise related SCS-C02 ACL questions on filtering logic and placement.

What is the key concept behind this question?

Standard ACLs match source addresses.

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

Same concept, more angles

2 more ways this is tested on SCS-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Refer to the exhibit. A security engineer is reviewing an IAM policy attached to an S3 bucket. What does this policy allow?

easy
  • A.Allows a role from another account to describe, start, and stop EC2 instances in the current account.
  • B.Allows a role to describe, start, and stop EC2 instances in the account.
  • C.Allows all IAM users in the account to view EC2 instances.
  • D.Allows an IAM user to list and manage objects in the S3 bucket.

Why B: Option C is correct because the policy allows ec2:DescribeInstances, ec2:StartInstances, and ec2:StopInstances actions. The resource is '*', so all EC2 instances in the account are affected. Option A is wrong because the actions are not S3. Option B is wrong because the policy allows start and stop. Option D is wrong because the principal is a role, not all users.

Variation 2. Refer to the exhibit. A security engineer is reviewing this IAM policy attached to a user. The user reports that they are able to stop and start instances, but they cannot terminate instances. However, the engineer notices that there is no explicit deny for termination. Why is the user unable to terminate instances?

hard
  • A.The policy does not include an explicit Allow for ec2:TerminateInstances.
  • B.The second statement's Resource is set to '*' but the Action list does not include termination.
  • C.The first statement's Resource element is too restrictive and does not include the termination API call.
  • D.The policy has a syntax error that prevents termination from being evaluated.

Why A: Option B is correct. The policy only allows specific actions. Since there is no 'ec2:TerminateInstances' action allowed, the user is implicitly denied the ability to terminate instances. AWS IAM defaults to implicit deny, so an explicit allow is required. Option A is incorrect because the resource in the first statement is 'instance/*' which covers termination if allowed. Option C is incorrect because termination is a separate action not included. Option D is incorrect because the policy is valid JSON and would be evaluated.

Keep practising

More SCS-C02 practice questions

Last reviewed: Jun 20, 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.