🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Management / Database Administration › Cloud Storage for Database Administrators › Lesson 6
TEC-DATA86-08 · Lesson 6 · 10 clock hours · demo

Identity, Access Management, and Encryption for Cloud Databases

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.

⚠ Pending professional review

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.

Why IAM and Encryption Matter for Cloud Databases

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.

Least-Privilege IAM for Database Access

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.

Encryption at Rest: Transparent Data Encryption

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 in Transit: TLS/SSL

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:

Auditing with Cloud-Native Logging

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

Safety Considerations

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.

Key terms9

Least PrivilegeThe security principle that grants a user, role, or service only the permissions strictly necessary to perform its assigned tasks, reducing the potential damage from a compromised identity.
IAM Role (AWS)An AWS identity that can be assumed by services such as EC2 instances, providing temporary credentials scoped to an attached policy rather than long-lived passwords or access keys.
Transparent Data Encryption (TDE)A database encryption feature that automatically encrypts data files on disk without requiring changes to application code; used in Azure SQL Database, SQL Server, and other platforms.
Customer-Managed Key (CMK)An encryption key that the customer creates, stores, and controls in a key management service such as Azure Key Vault, as opposed to a key managed automatically by the cloud provider.
Azure Key VaultA Microsoft Azure service that stores and manages cryptographic keys, secrets, and certificates, providing controlled access through policies tied to Azure AD identities.
Service PrincipalAn Azure AD identity created for an application or service (such as Azure SQL Database) so it can authenticate to other Azure resources without using a human user's credentials.
AWS CloudTrailAn AWS service that records API calls made in an account, capturing the caller identity, time, source IP, and outcome of each event for auditing and compliance purposes.
Encryption in TransitEncryption applied to data as it travels over a network between a client and a server, typically implemented using the TLS protocol to prevent interception.
Audit LogA timestamped, tamper-evident record of events — such as logins, queries, and administrative actions — used to verify compliance and investigate security incidents.
In class: Instructor-led demo followed by student replication: create an AWS IAM role with a least-privilege policy allowing read-only RDS access; assign the role to an EC2 instance; confirm the instance can read but cannot modify the database using that role. · Lab: enable Azure SQL Database Transparent Data Encryption with a customer-managed key stored in Azure Key Vault; verify the key vault access policy allows only the database service principal; confirm TDE status in the portal. · Log-review exercise: enable AWS CloudTrail or Azure Monitor diagnostic logs for a database instance; generate several connection and query events; download the log file and identify the timestamp, user, and action for each event in a structured worksheet.
Materials: AWS IAM console; AWS CloudTrail; Azure Key Vault; Azure Monitor; Azure SQL Database portal; Microsoft DP-300 exam objective list (security domain); DAMA CDMP exam body of knowledge (data security chapter)
Check: Role-access test: student demonstrates the read-only role cannot execute a DROP TABLE (expected error) but can execute SELECT; TDE status shown as enabled with customer key; log worksheet complete with all required fields; pass mark 80% on worksheet.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Microsoft DP-300 — Secure the Environment / DAMA CDMP — Data Security
1. A web application running on an EC2 instance needs to query an RDS PostgreSQL database but should never be able to delete tables. Which approach best follows the principle of least privilege?
Microsoft DP-300 — Secure the Environment
2. After assigning a read-only IAM role to an EC2 instance, a developer reports that a `DROP TABLE` command succeeded against the RDS database. What is the most likely cause?
Microsoft DP-300 — Secure the Environment
3. You are configuring TDE with a customer-managed key in Azure Key Vault for Azure SQL Database. Which Key Vault permissions must the database service principal have, and nothing more?
Microsoft DP-300 — Secure the Environment / DAMA CDMP — Data Security
4. A customer-managed key used for TDE in Azure SQL Database is accidentally revoked in Key Vault. What is the immediate effect on the database?
Microsoft DP-300 — Monitor and Optimize / DAMA CDMP — Data Security
5. Which AWS service records API-level events such as who called `DescribeDBInstances`, at what time, and whether the call succeeded?
DAMA CDMP — Data Security / Microsoft DP-300 — Secure the Environment
6. When configuring audit logs for a production database, a best practice is to send the logs to a storage account that is separate from the database account. Why?
Microsoft DP-300 — Secure the Environment / PostgreSQL CE — Security
7. An application's PostgreSQL connection string does not include `sslmode=require`. What risk does this create?
DAMA CDMP — Data Security
8. The DAMA CDMP data security chapter emphasizes that data security controls must be both preventive and detective. In the context of this lesson, which combination best represents one preventive control and one detective control?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.