Courseiva
Question 40 of 1,663
Deployment and MigrationmediumMultiple ChoiceObjective-mapped

IAM Policy Evaluation: Explicit Deny Overrides Allow for RDS

Exhibit

Refer to the exhibit.

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "rds:CreateDBInstance",
            "Resource": "arn:aws:rds:us-east-1:123456789012:db:new-*"
        },
        {
            "Effect": "Deny",
            "Action": "rds:CreateDBInstance",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "rds:DatabaseEngine": "oracle-se2"
                }
            }
        }
    ]
}
```

Refer to the exhibit. An IAM policy is attached to a user. The user attempts to create an RDS DB instance named 'new-prod-db' with Oracle Standard Edition Two engine. What will happen?

Quick Answer

The request will fail because an explicit deny always overrides an allow in AWS IAM policy evaluation. Even though the policy allows creating RDS instances with names starting with 'new-', the separate Deny statement targeting the Oracle engine is more specific and takes precedence, blocking the creation of 'new-prod-db' with Oracle Standard Edition Two. This scenario tests your understanding of the IAM policy evaluation logic, a critical concept for the AWS Certified Database Specialty DBS-C01 exam, where questions often present conflicting Allow and Deny statements to trap candidates who overlook the explicit deny rule. A common pitfall is assuming a broad Allow will win, but AWS enforces that any explicit Deny—regardless of order—immediately overrides all Allows. Remember the mnemonic: "Deny is the final word; one Deny kills every Allow heard."

⚠ Common exam trap

Candidates often assume a matching Allow on the resource name will override a Deny, but AWS IAM's explicit Deny always takes precedence, making the engine-specific Deny the decisive factor.

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 request will fail because the Deny condition matches the engine.

The IAM policy includes an explicit Deny for the `rds:CreateDBInstance` action when the engine is `oracle-se2`, which matches the Oracle Standard Edition Two engine. Since explicit Deny statements override any Allow statements, the request fails regardless of the name pattern match. AWS IAM evaluates Deny statements first, making the Deny effective and blocking the operation.

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 request will fail because the Deny condition matches the engine.

    Why this is correct

    Explicit Deny for Oracle denies the action.

  • The request will fail because there is no Allow for 'new-prod-db'.

    Why it's wrong here

    There is an Allow for names starting with 'new-', but Deny overrides.

  • The request will succeed because the Allow matches the name pattern.

    Why it's wrong here

    The Deny overrides the Allow.

  • The request will succeed because the Deny is not effective for 'new-prod-db'.

    Why it's wrong here

    Deny applies to all resources with condition.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

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

3 more ways this is tested on DBS-C01

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. An IAM policy is attached to a user who is deploying an RDS database. The user attempts to create a DB instance named 'my-database' using the AWS CLI. Which statement is true?

medium
  • A.The user cannot create the DB instance because the Deny statement applies to all actions
  • B.The user cannot create the DB instance because the resource ARN does not exist yet
  • C.The user cannot create the DB instance because of an error in the policy
  • D.The user can create the DB instance

Why D: The IAM policy explicitly allows the `rds:CreateDBInstance` action for the resource `arn:aws:rds:us-east-1:123456789012:db:my-database`. The Deny statement only applies to actions not listed in the Allow statement, but since the specific action and resource match the Allow, the user is permitted to create the DB instance. AWS IAM evaluates policies with an explicit Allow overriding an implicit Deny, and the Deny here does not block the allowed action.

Variation 2. Refer to the exhibit. An IAM policy is attached to a user. The user tries to delete a database instance named 'prod-mydb' in us-east-1. What will happen?

medium
  • A.The delete will be allowed because the Allow statement is broader.
  • B.The delete will fail with an error because the policy is invalid.
  • C.The delete will succeed only if the instance is tagged with 'Environment: prod'.
  • D.The delete will be denied because the Deny statement explicitly matches the resource.

Why D: D is correct because IAM policy evaluation follows an explicit deny priority rule. Even though the Allow statement grants 'rds:DeleteDBInstance' on 'arn:aws:rds:us-east-1:*:db:*', the Deny statement explicitly matches the resource 'arn:aws:rds:us-east-1:123456789012:db:prod-mydb' and specifies 'rds:DeleteDBInstance'. Since an explicit deny overrides any allow, the delete operation will be denied.

Variation 3. Refer to the exhibit. An IAM policy is attached to a user who needs to deploy an RDS MySQL instance. After creating the instance, the user tries to modify it to enable deletion protection, but the action fails. What is the most likely reason?

medium
  • A.The user does not have permission to describe instances.
  • B.The resource ARN is not specified in the policy.
  • C.The user does not have permission to enable deletion protection.
  • D.The user does not have permission to create the instance.

Why C: The IAM policy shown in the exhibit grants `rds:CreateDBInstance` but does not include `rds:ModifyDBInstance` or the specific action required to enable deletion protection (`rds:ModifyDBInstance` with the `DeletionProtection` parameter). Enabling deletion protection is a modification action, not part of the creation process, so the user lacks the necessary IAM permission for that operation.

Last reviewed: Jul 4, 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 DBS-C01 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 DBS-C01 exam.