Exam objective 3.1 asks you to implement access control and authentication mechanisms for AWS databases. This matters because, in the real world, a database full of customer payment details or medical records cannot just be 'open to anyone' — you need to know who is knocking, and precisely what that person is allowed to do once inside. For the DBS-C01 exam, you must understand how AWS IAM, database-native authentication, and Secrets Manager work together to build this layered defence.
Jump to a section
A simple way to picture Database Access Control and Authentication
Have you ever tried to get into a trendy nightclub that requires proof of membership?
You walk up to the door, and a large bouncer stands there, arms crossed. You don't just push past them. First, you show your membership card — that plastic card with your photo and a barcode. The bouncer scans it. The scanner checks: is your card authentic? Is it expired? Are you on the club's 'blacklist' from last week's incident? If everything checks out, the bouncer nods and lets you through the rope to the main floor. But you're not done yet. Inside, another attendant asks what kind of drink you want. If you're not 21, you get a wristband that restricts you to soft drinks only — even though you got past the front door. You see VIP areas roped off; even with a valid membership, you can't get in there unless your card specifically says 'Gold Tier'. This is exactly how database access control works. The front door bouncer is the database's initial authentication gate, checking who you are. The wristband and VIP ropes are 'authorisation' — once the database knows you're you (authenticated), it decides exactly what you're allowed to touch (authorisation). Your membership card type maps to an IAM role or database user account. The bouncer's scanner is the authentication protocol — password, certificate, or token. And that blacklist? That is a revoked credential or a Deny policy. Access control is not one simple yes/no question. It is a stack of checks, each one giving only the precise amount of entry you need.
Database access control is the set of rules that decides who can connect to a database and what they can do once connected. Think of it as two separate steps that always happen in order: authentication and authorisation.
Authentication is the 'who are you?' check. The person or system trying to connect provides a credential — something they know (a password), something they have (a certificate or a token), or something they are (biometrics, though this is rare for databases). The database checks that credential against its stored records. If the credential matches, the user is authenticated: the database has confirmed their identity. If it does not match, the connection is rejected.
Authorisation is the 'what are you allowed to do?' step, which happens only after authentication succeeds. Once the database knows who you are, it looks up your permissions. Can you read the customer table? Can you delete rows from the orders table? Can you create new databases? Authorisation rules are stored inside the database itself (for example, SQL GRANT statements) or managed externally through a system like AWS Identity and Access Management (IAM).
AWS databases offer several ways to handle authentication and authorisation. The first is database-native authentication. This is the oldest method. You create a user inside the database using a command like 'CREATE USER bob IDENTIFIED BY password123'. The password is stored inside the database. When Bob connects, the database checks the password it has on file. This method is simple but has a problem: the password might be stored in application configuration files, or a developer might paste it into a script, and suddenly it is exposed. Also, managing hundreds of users' passwords individually is a nightmare for large teams.
The second method is IAM database authentication. Here, AWS Identity and Access Management (IAM) becomes the gatekeeper. IAM is the AWS service that manages identities (users, groups, roles) and their permissions across all AWS services, not just databases. Instead of a static password, the user (or application) requests a temporary authentication token from IAM. This token is a short-lived string of characters that is valid for only 15 minutes. The user presents that token to the database instead of a password. The database checks with IAM to confirm the token is valid. If it is, the user is authenticated. This is far more secure because the token expires quickly — even if someone steals it, they cannot use it for long. It also means you never have to embed long-lived database passwords in your code.
The third method involves AWS Secrets Manager. Secrets Manager is a service that securely stores and automatically rotates secrets — database passwords, API keys, and other sensitive credentials. When an application needs to connect to a database, it asks Secrets Manager for the current password. Secrets Manager returns it, and the application uses it to connect. Secrets Manager can also be configured to change the password on a schedule (for example, every 30 days). This rotates the credential automatically, so even if an old password leaks, it becomes useless after rotation. The application never needs to know the new password in advance — it just asks Secrets Manager each time. This is a middle-ground approach: you are still using database-native authentication (username and password), but you have outsourced the insecure storage and rotation problem to a secure vault.
Why do multiple methods exist? Different situations demand different trade-offs. Database-native authentication is simple and works even if the network is completely isolated from the internet, but it is weak on credential theft. IAM authentication is stronger because it removes long-lived passwords, but it requires the database to be able to communicate with the IAM service (which means it needs internet access or a VPC endpoint). Secrets Manager offers a practical solution for legacy applications that need a plain username and password but that you still want to keep secure.
All three methods can be combined. For example, you might use IAM authentication for human users and Secrets Manager for legacy application connections. The key principle is 'least privilege' — give each user or application only the bare minimum permissions needed to do their job. If a user only needs to read customer names, do not give them permission to delete the table. This limits the damage if their credentials are compromised.
Finally, there is network-level access control. Security groups and network ACLs act like the club's neighbourhood: even if you have the perfect membership card, you cannot even knock on the door if your IP address is not in the allowed list. Security groups are virtual firewalls that control traffic to your database instance. They operate at the instance level and are stateful (if you allow incoming traffic, the response is automatically allowed out). Network ACLs (access control lists) operate at the subnet level and are stateless (you must explicitly define both inbound and outbound rules). In practice, most database security uses security groups, not NACLs, for simplicity.
All these layers — authentication, authorisation, credential management, and network controls — together form the full picture of database access control. For the DBS-C01 exam, you need to know the specific features of each AWS database service (Amazon RDS, Amazon Aurora, Amazon DynamoDB, Amazon ElastiCache, Amazon Redshift) and which authentication methods each supports.
Define the access requirements
List every person or application that needs to connect to the database. For each one, decide whether they need read, write, or administrative access. This step ensures you do not grant unnecessary privileges later.
Choose the authentication method for each identity
Based on the requirements, decide whether to use IAM database authentication, database-native passwords, or Secrets Manager. Human users with short sessions should use IAM authentication. Legacy applications that need a password should use Secrets Manager. Automated services on EC2 should use an IAM role.
Create the database users and map identities
If using IAM authentication, create a database user and map it to the IAM user or role ARN. If using Secrets Manager, create a standard database user and store its credentials in a new secret. If using native passwords, create the user directly with a strong password.
Configure network-level controls
Place the database in a private subnet and attach a security group that allows only necessary inbound traffic. Restrict source IP ranges to the corporate VPN or application servers. This prevents unauthorised network connections even if credentials are valid.
Apply database-level authorisation (GRANT commands)
Execute SQL commands to grant each authenticated user only the permissions they need. For example, GRANT SELECT ON table_name TO read_only_user. This ensures that even if a user authenticates successfully, they cannot perform unwanted actions.
Enable auditing and monitoring
Turn on AWS CloudTrail to log all IAM and Secrets Manager API calls. Enable database audit logs to track SQL queries. Set up Amazon CloudWatch alarms for unusual login failures or secret access patterns. This gives you visibility and a way to detect breaches.
Sophie is a database administrator at a company called 'QuickCart', an online grocery delivery startup. QuickCart uses an Amazon Aurora MySQL database to store customer accounts, order history, and payment information. The company has grown from 5 employees to 150 in two years, and security has become a top priority. Sophie needs to set up access control so that (a) developers can run queries to troubleshoot issues, (b) a nightly automated reporting script can read order data, and (c) the payment processing service can write new orders — all without exposing the database to unnecessary risk.
Sophie starts by locking down network access. She configures the Aurora database to be deployed inside a private subnet in the company's Amazon VPC (Virtual Private Cloud, which is a logically isolated section of the AWS cloud). She attaches a security group to the database that only allows inbound traffic from a specific set of IP addresses — the company's office VPN and a few specific application servers. No traffic from the public internet can reach the database at all.
Next, Sophie tackles authentication. For the developers, she sets up IAM database authentication. Each developer has an IAM user in the company's AWS account. Sophie attaches an IAM policy to each developer's user that grants them the permission to generate an authentication token for the Aurora database. When a developer needs to run a query, they use the AWS CLI (Command Line Interface) to request a temporary token. That token is passed to their SQL client, and they authenticate to the database with it. The token expires in 15 minutes, so if a developer leaves their laptop unlocked, the token becomes worthless quickly.
For the nightly reporting script, the situation is different. The script is written in Python and runs on an EC2 instance (Amazon Elastic Compute Cloud, a virtual server). The script does not have a human operator to type commands. Sophie cannot use IAM user authentication for this. Instead, she creates an IAM role — a set of permissions that can be assumed by an AWS resource — and attaches it to the EC2 instance. She also creates a database user inside Aurora that is mapped to this role. When the script runs, it automatically retrieves temporary credentials from the IAM role and uses them to authenticate to Aurora. No passwords are stored anywhere in the script.
For the payment processing service, the situation is more complex. This service is an older application that was written before IAM authentication existed. It expects to connect using a standard username and password. Sophie cannot rewrite the application. So she uses AWS Secrets Manager. She creates a secret in Secrets Manager that contains the database username and a strong password. She configures Secrets Manager to automatically rotate that password every 30 days. She also modifies the application's configuration so that, instead of reading a hardcoded password from a config file, it calls the Secrets Manager API to retrieve the latest password on each restart. Additionally, she applies an IAM policy that restricts the application's EC2 instance to only be able to read that specific secret — not any other secret in the account.
Finally, Sophie sets up database-level authorisation. Even after a user authenticates, they should not have free rein. Inside Aurora, she runs SQL commands to grant permissions: the reporting script gets only SELECT on the orders table; the developers get SELECT, INSERT, and UPDATE on non-payment tables; and the payment service gets INSERT and UPDATE on the payments table only. The 'root' superuser account is locked away and used only for emergency schema changes.
Every month, Sophie reviews the IAM policies and the Secrets Manager rotation logs. She also enables AWS CloudTrail to log every API call made to Secrets Manager and IAM. If someone tries to access a secret they should not, she sees it in the logs. This layered approach means that even if one defence fails — say, a developer's laptop is stolen — the other layers (short-lived token, security group, and database-level grants) still protect the data.
The DBS-C01 exam tests your understanding of access control across multiple AWS database services, but it focuses heavily on the differences between authentication methods and when to use each one. You will see scenario-based questions where you must choose the correct combination of IAM, Secrets Manager, and database-native authentication for a given situation.
Exact concepts they love to test:
The difference between IAM database authentication and database-native authentication. A typical trap question will describe a situation where an application needs to connect to an RDS database and ask 'which method provides the most secure authentication without storing long-term credentials?' The correct answer is IAM database authentication. A distractor answer will say 'use Secrets Manager' — but Secrets Manager still requires the application to handle a plain password, even if it is rotated. IAM authentication eliminates the password entirely.
The 15-minute token lifetime for IAM database authentication. The exam will ask: 'How long is an IAM authentication token valid for RDS?' The answer is 15 minutes. They may phrase this as a 'short-lived credential' or 'temporary token'. If you see 5 minutes, 1 hour, or 24 hours as options, those are traps.
Which services support IAM database authentication. The exam expects you to know that Amazon RDS for MySQL, MariaDB, PostgreSQL, and Amazon Aurora (both MySQL-compatible and PostgreSQL-compatible editions) support IAM database authentication. Amazon RDS for SQL Server, Oracle, and Amazon DynamoDB do not use IAM database authentication in the same way. DynamoDB uses IAM policies directly on the API, not a token exchange. Amazon ElastiCache does not support IAM database authentication at all — it uses Redis/Memcached native auth or RBAC.
Secrets Manager rotation mechanics. Questions will ask: 'How does Secrets Manager rotate a database password without downtime?' The answer involves creating a new password, updating the database with the new password while keeping the old one active, testing the new password, and then retiring the old one. This is the 'two-phase rotation' strategy. They may ask about rotation schedules — the minimum interval is one day.
IAM policy conditions for database access. The exam tests whether you know to use conditions like 'aws:SourceIp' to restrict access to specific IP ranges, or 'aws:SourceVpc' to restrict to a specific VPC. A common trap is a question that says 'a developer can generate a token from any location' — the correct answer will involve adding an IAM policy condition to limit the IP range.
Security groups vs. network ACLs. The exam often includes a question about controlling network-level access to a database. Remember: security groups are stateful (reply traffic automatically allowed) and operate at the instance level. Network ACLs are stateless (must define both inbound and outbound rules) and operate at the subnet level. If the question mentions a 'firewall for the database instance', the answer is security group. If it mentions 'subnet-level traffic filtering', the answer is network ACL.
The difference between authentication and authorisation. The exam will have a question that deliberately blurs the two lines. For example: 'A user is authenticated to the database but cannot read the table. What is missing?' The answer is 'authorisation' or 'database-level permissions (GRANT)'. Not 're-authentication' or 'a new token'.
Secrets Manager vs. Systems Manager Parameter Store. Both can store secrets, but Secrets Manager offers automatic rotation and is designed specifically for passwords. Parameter Store is cheaper but does not rotate automatically. The exam will ask: 'Which service should you use for automatically rotating database passwords?' The answer is Secrets Manager.
Multi-factor authentication (MFA) for database access. While MFA is not directly a database feature, you can require MFA in the IAM policy before a user can generate an authentication token. A question may ask: 'How do you enforce MFA for database access?' The answer is to add an IAM policy condition 'aws:MultiFactorAuthPresent: true'.
Common traps:
Assuming all AWS databases support IAM authentication. They do not. Oracle and SQL Server rely on native authentication or Security Assertion Markup Language (SAML)-based federation.
Confusing 'network ACL' with 'security group' — especially in questions about stateful vs stateless firewalls.
Thinking that Secrets Manager eliminates the need for database users. It does not — the database user still exists, Secrets Manager just stores and rotates the password securely.
Forgetting that IAM roles can be assumed by AWS services like EC2, Lambda, and ECS, and those roles can be mapped to database users.
IAM database authentication removes the need for a static password by issuing a temporary token that expires in 15 minutes.
Secret rotation in AWS Secrets Manager follows a two-phase process that creates a new password, updates the database, and retires the old one without downtime.
Security groups are stateful firewalls at the instance level; network ACLs are stateless firewalls at the subnet level — do not confuse them.
Authentication proves who you are; authorisation controls what you can do — both are required for proper database access control.
Not all AWS database services support IAM database authentication; Amazon RDS for Oracle and SQL Server do not.
The principle of least privilege means you grant each user or application only the permissions absolutely necessary to perform their function.
These come up on the exam all the time. Here's how to tell them apart.
IAM Database Authentication
Uses a temporary token that expires in 15 minutes.
No long-term password is stored anywhere.
Token generation is controlled by IAM policies.
Database-Native Authentication
Uses a static username and password stored in the database.
Password must be stored in application code or config files (or a vault).
Password management is manual unless combined with Secrets Manager.
Security Group
Operates at the instance level (virtual firewall for each resource).
Stateful: reply traffic is automatically allowed.
Default outbound rule allows all traffic.
Network ACL
Operates at the subnet level (applies to all instances in that subnet).
Stateless: both inbound and outbound rules must be defined explicitly.
Default rule denies all traffic.
Secrets Manager
Stores and rotates static passwords.
Application retrieves the password on each connection (or at startup).
Supports any database that uses username/password authentication.
IAM Database Authentication
Eliminates passwords entirely, using temporary tokens.
Application generates a token on demand, no password retrieval.
Supported only by specific database engines (MySQL, PostgreSQL, Aurora).
Authentication
Answers: 'Who are you?'
Performed at connection time using a credential (password, token, certificate).
If it fails, the connection is rejected immediately.
Authorisation
Answers: 'What are you allowed to do?'
Performed after authentication, using database permissions (GRANT statements).
If it fails, the user is connected but operations are blocked.
Mistake
Once a user is authenticated to the database, they can do anything.
Correct
Authentication only proves identity. Authorisation (separate permissions) controls what the user can do, such as reading specific tables or running certain queries.
In everyday life, the two concepts are often combined (a key to a house gives you full access). People naturally assume authentication equals full permission.
Mistake
IAM database authentication requires the database password to be stored in the application code.
Correct
IAM database authentication uses temporary tokens that are obtained on demand from the IAM service. No static password is stored anywhere.
The word 'authentication' sounds like it must involve a fixed password. People familiar with traditional databases do not realise that IAM replaces the password with a token.
Mistake
Secrets Manager and IAM database authentication work the same way.
Correct
Secrets Manager securely stores and rotates static passwords that the application retrieves. IAM database authentication eliminates static passwords entirely in favour of short-lived tokens.
Both are AWS security services that 'handle credentials', so beginners lump them together. They do not realise one uses a password and the other does not.
Mistake
A network ACL is the same as a security group, just named differently.
Correct
A security group operates at the instance level and is stateful (response traffic is automatically allowed). A network ACL operates at the subnet level and is stateless (you must define both inbound and outbound rules).
Both control network traffic and are created in the VPC console. Their names are similar, and beginners rarely encounter a scenario where the difference matters until it breaks something.
Mistake
If I use Secrets Manager to rotate my database password, I don't need to worry about database user permissions anymore.
Correct
Secrets Manager handles credential rotation, but database-level authorisation (GRANT/REVOKE statements) still controls what each user can do inside the database. The two are separate concerns.
People think 'strong password = secure database'. They overlook the fact that a valid user with too many privileges is still a risk, even with a rotated password.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
IAM database authentication is a protocol where the database user presents a temporary token to the database. An IAM role for EC2 is a way for an EC2 instance to get temporary AWS credentials. They work together: the EC2 instance assumes an IAM role, then uses that role's permissions to generate an authentication token for the database.
No. Amazon RDS for SQL Server does not support IAM database authentication. You must use SQL Server native authentication or Windows Authentication (if the database is in a domain). IAM database authentication is supported for RDS MySQL, MariaDB, PostgreSQL, and Aurora.
The token is valid for 15 minutes. After that, the database rejects it and you must generate a new one. This is a hard limit set by AWS to minimise the risk of stolen tokens.
No. You must enable rotation and choose a rotation interval (minimum 1 day). Secrets Manager provides a pre-built Lambda function that performs the rotation, but you must configure which database it targets and grant the Lambda function the necessary permissions.
A security group is a critical layer, but it is not enough on its own. It blocks network traffic, but if a valid user's credentials are compromised, the security group will not stop them. You must also enforce strong authentication, least-privilege authorisation, and encryption. Defence in depth means using all these layers together.
A superuser (often named 'root' or 'admin') has unrestricted access to the entire database — they can create users, drop tables, and change configuration. A regular user has only the permissions explicitly granted to them. Best practice is to never use the superuser account for routine work and to lock away its credentials.
You've finished Database Access Control and Authentication. Continue through the DBS-C01 study guide to build a complete picture of the exam.
Done with this chapter?