Courseiva
Database SecurityhardMultiple ChoiceObjective-mapped

DBS-C01 Database Security Practice Question

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "rds:DescribeDBInstances",
        "rds:CreateDBSnapshot",
        "rds:DeleteDBSnapshot"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Deny",
      "Action": "rds:DeleteDBInstance",
      "Resource": "arn:aws:rds:us-east-1:123456789012:db:prod-db"
    }
  ]
}

An IAM policy is attached to a user. What is the effect of this policy on the user's ability to delete the DB instance named prod-db?

The policy is:

```json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": "rds:DeleteDBInstance",
      "Resource": "arn:aws:rds:us-east-1:123456789012:db:prod-db"
    },
    {
      "Effect": "Allow",
      "Action": "rds:*",
      "Resource": "*"
    }
  ]
}

```

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 user cannot delete the DB instance because the Deny statement explicitly denies it.

In IAM policy evaluation, an explicit Deny overrides any Allow. The policy explicitly denies the `rds:DeleteDBInstance` action on the `prod-db` resource, so the user cannot delete the DB instance, regardless of the Allow statement granting all RDS actions.

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 user can delete the DB instance only after creating a final snapshot.

    Why it's wrong here

    Assumes a condition about final snapshots, but without the policy, we cannot verify if such a condition exists.

  • The user can delete the DB instance because the Allow statement grants all actions.

    Why it's wrong here

    Assumes an Allow statement grants all actions, but without the policy, we cannot confirm the presence or scope of such an Allow.

  • The user cannot delete the DB instance because the Deny statement explicitly denies it.

    Why this is correct

    Assumes an explicit Deny statement, but without the policy, we cannot confirm whether a Deny exists.

  • The user can delete the DB instance because the Allow statement is broader and applies to all resources.

    Why it's wrong here

    Assumes a broader Allow that applies to all resources, but without the policy, we cannot confirm the existence or scope of such an Allow.

About these practice questions

One of 1,663 original DBS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not 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 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. Refer to the exhibit. An IAM policy is attached to a user. What is the effect when the user attempts to delete the RDS DB instance named 'prod-db'?

medium
  • A.The user can delete any other instance except 'prod-db'.
  • B.The user can delete the instance because the Deny statement only applies to snapshots.
  • C.The user cannot delete the instance because of the explicit Deny statement.
  • D.The user can delete the instance because of the Allow on DescribeDBInstances.

Why C: The policy explicitly denies the rds:DeleteDBInstance action on the specific resource. Even though there is an Allow on other actions, an explicit Deny overrides any Allow. The user cannot delete the instance. Option A is wrong because the Deny takes precedence. Option B is wrong because the policy explicitly prevents deletion. Option D is wrong because the Deny is on the specific instance.

Variation 2. A security engineer creates the IAM policy shown in the exhibit and attaches it to an IAM user. What is the effect of this policy?

medium
  • A.The user can delete any database except 'prod-db'.
  • B.The user can describe all databases except 'prod-db'.
  • C.The user can modify 'prod-db' but cannot delete it.
  • D.The user can modify any database except 'prod-db'.

Why C: The IAM policy allows DescribeDBInstances and ModifyDBInstance on all resources, but explicitly denies DeleteDBInstance on the database 'prod-db'. Since an explicit deny overrides any allow, the user cannot delete 'prod-db'. However, the policy does not allow DeleteDBInstance on any database, so the user cannot delete any database. For 'prod-db', the user can still modify and describe it because the deny is only for the delete action. Thus, the user can modify 'prod-db' but cannot delete it.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.