Objective. Students will implement least-privilege IAM roles for database access, enable encryption at rest and in transit, and audit access events using cloud-native logging tools.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
Cloud databases store some of the most sensitive data an organization handles — customer records, financial transactions, health information, and proprietary business data. Two controls protect that data more than any other: Identity and Access Management (IAM), which controls who can do what, and encryption, which makes data unreadable without the right key. Database administrators are responsible for configuring both correctly. Misconfiguration is the leading cause of cloud data breaches, so accuracy here is not optional.
The principle of least privilege means every user, service, or application receives only the permissions it needs to perform its job — nothing more. In AWS, you enforce this through IAM policies attached to users, groups, or roles. A role is an IAM identity that can be assumed by an AWS service (such as an EC2 instance) rather than a human user. This is safer than embedding credentials in code.
A least-privilege policy for read-only RDS access grants actions such as `rds:DescribeDBInstances` and database-level `SELECT` but explicitly denies or simply omits write and administrative actions like `rds:DeleteDBInstance`. When you attach that role to an EC2 instance, any application running on that instance inherits only those permissions. Attempting a `DROP TABLE` through that role produces an access-denied error — exactly the behavior you want.
Key steps when creating a least-privilege role:
1. Identify the minimum set of API actions the workload actually needs.
2. Scope the resource field to the specific database ARN, not a wildcard.
3. Attach the policy to a role, not directly to a user, so credentials are temporary and rotate automatically.
4. Test by attempting both an allowed action (SELECT) and a denied action (DROP TABLE) before moving to production.
In Azure, the equivalent concept uses Azure Active Directory (Azure AD) identities and Role-Based Access Control (RBAC). Built-in roles such as Reader or custom roles scoped to a specific Azure SQL Database follow the same least-privilege pattern.
Transparent Data Encryption (TDE) encrypts the physical data files of a database automatically, without requiring changes to application code. Azure SQL Database enables TDE by default using a service-managed key. For stronger control, you can supply a customer-managed key (CMK) stored in Azure Key Vault.
When you use a CMK:
Verifying TDE status: in the Azure portal, navigate to the database, select Transparent Data Encryption, and confirm the status is On and the key source shows your Key Vault URI.
Encryption at rest protects data on disk. Encryption in transit protects data moving between a client and the database server. Both AWS RDS and Azure SQL Database enforce TLS by default and should be left that way. DBAs should:
Controls are only as good as your ability to verify they are working. AWS CloudTrail records API-level events — who called which AWS API, from which IP address, at what time, and whether it succeeded. Azure Monitor diagnostic logs (and Azure SQL Auditing) record database-level events: logins, queries, and schema changes.
To audit effectively:
1. Enable logging before you need it — logs do not capture events that occurred before they were turned on.
2. Send logs to a storage account or log analytics workspace you control, separate from the database account, so a compromised database account cannot tamper with the audit trail.
3. When reviewing a log, locate at minimum: timestamp, identity (user or role), action, resource, and outcome (success or failure).
A structured worksheet that records these five fields for each event gives you an evidence trail suitable for compliance reporting under frameworks referenced in the DAMA CDMP body of knowledge (data security chapter).
Cloud IAM errors can cause outages. Before modifying production roles or revoking key vault access, take a configuration snapshot and schedule a change window. Never test destructive actions (DROP, DELETE) in a production environment — use a dedicated lab or staging database. When handling encryption keys, treat them with the same care as physical lock combinations: document custody, restrict access, and keep at least one tested backup of the key material in a geographically separate vault.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.