DBS-C01 Explicit Deny Practice Question
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds:DescribeDBInstances",
"rds:ModifyDBInstance"
],
"Resource": "*"
},
{
"Effect": "Deny",
"Action": "rds:DeleteDBInstance",
"Resource": "arn:aws:rds:us-east-1:123456789012:db:prod-db"
}
]
}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?
⚠ Common exam trap
The trap is that the explicit deny on DeleteDBInstance for 'prod-db' might be misinterpreted as also blocking ModifyDBInstance for that database, but it only affects the delete action.
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 can modify 'prod-db' but cannot delete it.
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.
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 any database except 'prod-db'.
Why it's wrong here
Incorrect. The user cannot delete any database because there is no allow for DeleteDBInstance. The explicit deny on 'prod-db' is redundant but does not grant delete on other databases.
- ✗
The user can describe all databases except 'prod-db'.
Why it's wrong here
Incorrect. The user can describe all databases, including 'prod-db', because DescribeDBInstances is allowed on all resources.
- ✓
The user can modify 'prod-db' but cannot delete it.
Why this is correct
Correct. The user can modify all databases because ModifyDBInstance is allowed, but cannot delete 'prod-db' due to the explicit deny. For other databases, deletion is also denied implicitly.
- ✗
The user can modify any database except 'prod-db'.
Why it's wrong here
Incorrect. The user can modify 'prod-db' as ModifyDBInstance is allowed on all resources, not excluded.
Go deeper
Related to this question
About these practice questions
This DBS-C01 question is part of Courseiva's 1,663-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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. 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": "*" } ] } ```
hard- A.The user can delete the DB instance only after creating a final snapshot.
- B.The user can delete the DB instance because the Allow statement grants all actions.
- ✓ C.The user cannot delete the DB instance because the Deny statement explicitly denies it.
- D.The user can delete the DB instance because the Allow statement is broader and applies to all resources.
Why C: 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.
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.