Question 1,034 of 1,730
Database SecuritymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to ensure the IAM role used by the application has a name that matches the database user 'app_user' and has the necessary policy attached. This is correct because RDS MySQL IAM database authentication requires an exact name match between the database user and the IAM principal (user or role) that generates the authentication token; the token is cryptographically bound to that principal’s name, so any mismatch causes an 'Access denied' error. On the AWS Certified Database Specialty DBS-C01 exam, this concept tests your understanding of how IAM database authentication enforces identity binding at the database level, often appearing as a trap where candidates overlook the name-matching requirement or confuse it with standard IAM policy evaluation. A common memory tip is to think of the IAM principal and the database user as a key and lock that must share the same label—if the names don’t align, the token simply won’t turn.

DBS-C01 Database Security Practice Question

This DBS-C01 practice question tests your understanding of database 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.

A company uses Amazon RDS for MySQL with encryption at rest enabled. The security team mandates that all access to the database must be authenticated using IAM database authentication. The database administrator has created a user 'app_user' and granted appropriate privileges. However, when the application tries to connect using an IAM authentication token, it receives an 'Access denied' error. Which action should be taken to resolve this issue?

Question 1mediummultiple choice
Full question →

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

Ensure the IAM role used by the application has a name that matches the database user 'app_user' and has the necessary policy attached.

Option C is correct because IAM database authentication for RDS MySQL requires that the database user name matches the IAM role or user name used to generate the authentication token. The IAM role must have a policy that allows the `rds-db:connect` action with a resource ARN specifying the database user. Without this exact match, the authentication token is rejected, resulting in an 'Access denied' error.

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.

  • Create a password for 'app_user' and use that password in the connection string.

    Why it's wrong here

    IAM database authentication does not require a password; the authentication token replaces the password.

  • Modify the security group to allow inbound traffic on port 3306 from the application's IP address.

    Why it's wrong here

    Network connectivity is likely fine; the error is an authentication failure, not a connection timeout.

  • Ensure the IAM role used by the application has a name that matches the database user 'app_user' and has the necessary policy attached.

    Why this is correct

    IAM database authentication requires the database user name to match the IAM user or role name (or a mapped DB user) that has been granted the rds_iam role.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Download the latest Amazon RDS CA certificate and add it to the application trust store.

    Why it's wrong here

    Certificate validation is for SSL connections, but the error is specifically about access denied, not SSL handshake failure.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse IAM database authentication with network-level security (security groups) or TLS certificate management, when the core requirement is the exact name match between the database user and the IAM principal (role or user) used to generate the token.

Detailed technical explanation

How to think about this question

Under the hood, IAM database authentication works by the application calling the `RDS.CreateAuthToken` API (or using the AWS CLI `generate-db-auth-token`) to produce a token that is a signed string containing the AWS access key, region, and DB instance endpoint. The token is used as the password in the MySQL connection, and RDS validates it against the IAM policy attached to the role or user. A common real-world scenario is when a developer creates a database user named 'app_user' but attaches the IAM policy to a role named 'my-app-role', causing a mismatch; the IAM role name must be the database user name, or the policy must specify the correct database user in the resource ARN.

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 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.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DBS-C01 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 DBS-C01 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 DBS-C01 question test?

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

What is the correct answer to this question?

The correct answer is: Ensure the IAM role used by the application has a name that matches the database user 'app_user' and has the necessary policy attached. — Option C is correct because IAM database authentication for RDS MySQL requires that the database user name matches the IAM role or user name used to generate the authentication token. The IAM role must have a policy that allows the `rds-db:connect` action with a resource ARN specifying the database user. Without this exact match, the authentication token is rejected, resulting in an 'Access denied' error.

What should I do if I get this DBS-C01 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

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. A company is using Amazon RDS for MySQL with encryption at rest enabled. The security team requires that all access to the database be authenticated using IAM database authentication. Which combination of steps must the company take to meet this requirement?

medium
  • A.Create an IAM role with a policy that allows rds:Connect and attach it to the RDS instance.
  • B.Create a database user with a password and attach an IAM role that allows rds-db:connect to the database user.
  • C.Enable SSL on the RDS instance and create an IAM policy that allows rds:Connect.
  • D.Create an IAM policy that allows the rds-db:connect action and map the IAM role to a database user created with the AWSAuthenticationPlugin.

Why D: Option C is correct because IAM database authentication for RDS MySQL requires creating an IAM role with a policy that allows the rds-db:connect action, then mapping that role to a database user using the CREATE USER statement with the AWSAuthenticationPlugin. Option A is wrong because SSL is not required for IAM auth, though recommended. Option B is wrong because the policy must include rds-db:connect, not rds:connect. Option D is wrong because the database user must be created with AWSAuthenticationPlugin, not with a password.

Variation 2. A financial services company uses Amazon RDS for MySQL to store sensitive customer data. The compliance team requires that all database administrators (DBAs) must authenticate using IAM database authentication, and no static database passwords should be used. A junior DBA has been granted the rds_iam role in the database. However, the junior DBA is unable to connect using the AWS CLI command: aws rds generate-db-auth-token --hostname mydb.xyz.us-east-1.rds.amazonaws.com --port 3306 --username jdba. The error message says 'Access denied'. What is the most likely cause?

hard
  • A.The RDS instance does not have a resource-based policy that grants the junior DBA access.
  • B.The junior DBA is not using an SSL connection to the database.
  • C.The security group does not allow inbound traffic on port 3306 from the junior DBA's IP address.
  • D.The RDS instance does not have IAM database authentication enabled.

Why D: Option C is correct because IAM database authentication requires the RDS instance to have the IAM DB authentication enabled; if it is not enabled, the authentication token will be rejected. Option A is wrong because the error 'Access denied' suggests authentication failure, not a network issue. Option B is wrong because SSL/TLS is required for IAM auth, but the error would be different if SSL was not used. Option D is wrong because the RDS resource-based policy cannot grant the IAM user permission to generate the token; that requires an IAM policy attached to the user or role.

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 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.