Courseiva
DBS-C01Chapter 9 of 17Objective 3.2

Database Encryption at Rest and in Transit

Database encryption at rest and in transit. This concept solves the problem of keeping data safe from unauthorised access whether it is stored on a disk or moving across a network. For the DBS-C01 exam, understanding how AWS Key Management Service (KMS), AWS Certificate Manager (ACM), and database-level encryption features work together is essential because every scenario question on security will test your ability to choose the right encryption method for the right situation.

12 min read
Intermediate
Updated Jul 23, 2026
Editorial oversight: Johnson Ajibi· Security Systems Architect · MSc IT Security · IEEE Senior Member

A simple way to picture Database Encryption at Rest and in Transit

The Armoured Truck Courier Analogy

A courier for an armoured truck company is responsible for moving cash between a bank branch and a central vault. Their job has two distinct phases: securing the cash while it sits still and securing the cash while it moves.

While the cash is inside the bank vault, the courier locks it inside a steel strongbox. That strongbox is the equivalent of encryption at rest. Even if someone breaks into the vault, they still cannot open the strongbox without the key. The courier does not leave cash lying on a table where any cleaner can grab it.

When it is time to move the cash to the central vault, the courier seals the strongbox inside the armoured truck. The truck has reinforced doors, bulletproof glass, a two-way radio to headquarters, and a driver and guard who verify each other's identity before the journey starts. That sealed truck is the equivalent of encryption in transit. The cash is protected while it travels along public roads where anyone could attempt an intercept.

If the courier simply threw cash into the back of a minivan with a flimsy lock, a thief could grab the cash at either endpoint or during the drive. The entire process would fail. Database encryption works the same way. You protect data while it is stored on disk (the vault strongbox) and while it travels across a network (the armoured truck). If you only protect one phase, the data is still vulnerable during the other phase. Both layers are required for true security.

How It Actually Works

Encryption is the process of scrambling readable data (called plaintext) into an unreadable format (called ciphertext) using a secret value called a key. Only someone with the correct key can reverse the process (decrypt) to get back the original data. Think of a key as a very long password that a computer uses automatically.

Encryption protects data in two separate states: at rest and in transit. Data at rest means data stored on a physical medium such as a hard drive, a solid-state drive, a backup tape, or a database file on disk. If someone steals the physical drive, or gains access to the storage system, encrypted data is useless to them because they cannot read it without the key. Data in transit means data moving across a network — for example, from your application to the database, or from one database to another during replication. If an attacker intercepts network traffic, encrypted data looks like random noise and cannot be understood.

AWS provides several tools to achieve encryption at rest and in transit. The most important one for the DBS-C01 exam is AWS Key Management Service (KMS). KMS is a managed service that creates, stores, and rotates encryption keys. You never have to manage the underlying hardware or software that protects the keys. KMS integrates with many AWS services, including Amazon RDS (Relational Database Service), Amazon Aurora, Amazon DynamoDB, and Amazon Redshift.

When you enable encryption at rest for an Amazon RDS database, AWS uses a key from KMS to encrypt the database storage, the automated backups, the read replicas, and the snapshots. The encryption happens at the storage layer — the database engine itself does not need to be modified. When your application reads data from the database, AWS automatically decrypts the data in the background using the same KMS key. This process is transparent to your application.

For encryption in transit, the standard approach is to use TLS (Transport Layer Security), formerly known as SSL (Secure Sockets Layer). TLS creates an encrypted tunnel between a client and a server. To use TLS, the server must present a digital certificate. A certificate is like a digital passport that proves the server's identity. AWS Certificate Manager (ACM) lets you provision, manage, and deploy these certificates for use with AWS services such as RDS, Aurora, and Elastic Load Balancing. ACM can automatically renew certificates, so you never have an expired certificate that breaks connectivity.

Database-level encryption features are additional options built into the database engine itself. For example, Amazon RDS for Oracle supports Transparent Data Encryption (TDE). TDE encrypts data as it is written to disk and decrypts it as it is read, without requiring changes to the application. Amazon RDS for SQL Server supports Transparent Data Encryption (TDE) as well. Amazon RDS for MySQL and PostgreSQL do not have built-in TDE, so for those engines you rely on the AWS-managed encryption at rest feature that encrypts the entire storage volume.

Why does this matter for security? Compliance frameworks such as PCI DSS, HIPAA, and GDPR often require encryption at rest and in transit for sensitive data. If you are building a healthcare application that stores patient records, you must enable both types of encryption to pass an audit. The DBS-C01 exam will present scenarios where you must decide which encryption method to use, which key to select, and whether a certificate from ACM or a KMS key is the right choice.

A common beginner mistake is thinking that encryption at rest alone is sufficient. If a database has encryption at rest enabled but does not enforce TLS connections, an attacker on the same network could intercept traffic and read plaintext data as it travels between the application and the database. Conversely, if you enforce TLS but leave the database storage unencrypted, someone who steals the physical disk can read all the data. Both layers are required for complete protection.

Another important concept is key rotation. KMS can automatically rotate your keys once per year by default. You can also create new keys manually and change which key a database uses. Rotation limits the damage if a key is compromised — the older key becomes useless for encrypting new data. The DBS-C01 exam tests whether you know that automatic key rotation must be enabled in KMS, and that it only applies to the key material, not the aliases or metadata.

Finally, understand the difference between server-side encryption and client-side encryption. Server-side encryption is when the AWS service (such as RDS) encrypts data on your behalf using a KMS key. Client-side encryption is when your application encrypts the data before sending it to AWS. For the DBS-C01 exam, server-side encryption with KMS is the most commonly tested approach for databases.

Flow diagram showing how an application connects to an encrypted RDS database using TLS (ACM) and how the storage and backups are encrypted using KMS keys.

Walk-Through

1

Create a Customer-Managed KMS Key

Go to AWS KMS and create a symmetric key. Assign a meaningful alias (e.g., 'prod-rds-key') and define a key policy that grants the RDS service principal permission to use the key. Enable automatic rotation to replace the key material every year. This key will encrypt the database storage, backups, and snapshots.

2

Launch an Encrypted RDS Instance

In the RDS console, choose 'Create database'. Under 'Storage', select 'Enable encryption' and choose the KMS key you created. AWS will encrypt the entire storage volume, the automated backups, and any read replicas. You cannot change this setting after creation without a snapshot restore process.

3

Obtain a TLS Certificate from ACM

Open AWS Certificate Manager and request a public certificate or import an existing one. For RDS, you typically use the public certificate for the AWS region. ACM will validate domain ownership (if using a custom domain) or provide a default Amazon-issued certificate. Certificates from ACM are free.

4

Configure RDS to Require TLS Connections

Modify the RDS DB parameter group. Set the parameter 'rds.force_ssl' to '1'. Apply the change immediately (or during the next maintenance window). Then download the public CA certificate bundle from AWS and configure your application's database client to use TLS when connecting to the RDS endpoint.

5

Test and Verify Both Encryption Layers

Attempt to connect to the database without TLS (using a plain TCP connection). The connection should be refused. Query the database to confirm that storage encryption is 'enabled' in the RDS console. Review CloudTrail logs to verify that the KMS key is being used for decrypt operations during read requests.

What This Looks Like on the Job

An IT professional working for a financial technology company is tasked with securing a new Amazon RDS for PostgreSQL database that will store customer transaction records. The company must comply with PCI DSS, which requires that all cardholder data be encrypted both at rest and in transit.

First, the IT professional creates a customer-managed key in AWS KMS. They choose to create a symmetric key, which means the same key is used to encrypt and decrypt data. They assign key usage permissions to the IAM role that the application uses to connect to the database. They also enable automatic yearly rotation so that the key material is replaced periodically without manual intervention.

Next, they launch an Amazon RDS for PostgreSQL instance. During the creation wizard, they select the option 'Enable encryption' and choose the KMS key they just created. AWS encrypts the database storage, the automated backups, the manual snapshots, and any read replicas with that same key. The IT professional verifies encryption by checking the RDS console, which shows a green indicator next to 'Encryption' on the database details page.

For encryption in transit, the IT professional obtains a public TLS certificate from AWS Certificate Manager. They configure the RDS instance to require TLS connections by setting the 'rds.force_ssl' parameter to '1' in the DB parameter group. They then modify the application's connection string to use the 'sslrootcert' parameter pointing to the trusted CA (Certificate Authority) bundle. Every connection between the application and the database is now encrypted.

The IT professional also tests the setup by attempting to connect without TLS using a raw PostgreSQL client. The connection is refused because the database requires TLS. This confirms that no application can accidentally send plaintext data over the network.

A few months later, an auditor requests evidence of encryption. The IT professional provides:

A screenshot of the RDS console showing encryption enabled

A copy of the KMS key policy showing the key ARN (Amazon Resource Name)

A log entry from the database showing TLS connections are enforced

A certificate from ACM showing the certificate is valid and renewed

The auditor is satisfied. The IT professional's careful implementation of both encryption at rest and in transit means the company passes the audit without findings.

If the IT professional had only enabled encryption at rest but forgotten to enforce TLS, the auditor would have noted a finding. PCI DSS explicitly requires that cardholder data be encrypted when transmitted over public networks. The missing TLS enforcement would have been a compliance failure requiring immediate remediation.

How DBS-C01 Actually Tests This

The DBS-C01 exam tests encryption at rest and in transit extensively in Domain 3 (Security). Expect at least four to six questions on this topic across the exam. These questions fall into several distinct patterns.

First, scenario-based questions ask you to choose the correct encryption method for a given situation. For example, a company needs to encrypt data in an existing RDS database with minimal downtime. The correct answer is to create a read replica with encryption enabled, promote it to a standalone instance, then delete the original. You cannot directly enable encryption on an existing unencrypted RDS instance. This is a common trap — beginners think there is a toggle switch in the console, but that toggle only appears during database creation.

Second, questions about KMS key types. The exam loves to test the difference between customer-managed keys and AWS-managed keys. Customer-managed keys give you more control, including the ability to enable automatic rotation (once per year), view key usage logs in CloudTrail, and delete the key. AWS-managed keys are created and managed by AWS on your behalf — you cannot view the key policy or control rotation. The correct answer in most security-conscious scenarios will be to use a customer-managed key.

Third, questions about encryption in transit with ACM. They will present a scenario where a database is using an expired certificate, causing connection failures. The correct answer is to create or import a new certificate in ACM, then modify the RDS instance to use the new certificate. A common trap is suggesting you can renew the certificate directly on the RDS instance — you cannot. You must update the certificate in the console after ACM provides a new one.

Fourth, questions about database-level encryption features. For Oracle and SQL Server, TDE is an additional option that encrypts at the database file level. However, if RDS encryption is already enabled, enabling TDE on top of it is redundant. The exam tests whether you know that RDS encryption encrypts the entire storage volume, so TDE is not necessary. A wrong answer might suggest you must have both enabled for compliance.

Fifth, questions about cross-account encryption. If you have a KMS key in Account A and an RDS instance in Account B, you must grant permissions to the KMS key to allow the RDS service in Account B to use it. The exam tests the key policy and the IAM policy together. A trap is thinking that IAM alone is sufficient — KMS requires a key policy as well.

Key definitions to memorise:

Encryption at rest: protects data on disk, including backups and snapshots

Encryption in transit: protects data moving across networks (typically using TLS)

KMS: managed service for creating and controlling encryption keys

ACM: managed service for provisioning and managing TLS certificates

TDE: database-level encryption for Oracle and SQL Server

Key rotation: replacing a key's cryptographic material on a schedule

Trap patterns to recognise:

Enabling encryption on an existing database requires a manual process (snapshot, copy with encryption, restore)

Automatic key rotation in KMS only applies to customer-managed keys

TLS enforcement is separate from enabling encryption at rest — you must configure both separately

ACM certificates are free for use with AWS services, but you pay for them if exported for use outside AWS

Key Takeaways

Encryption at rest protects data on disk using AWS KMS, while encryption in transit protects data across networks using TLS certificates from ACM.

You cannot enable encryption on an existing unencrypted RDS database directly — you must create an encrypted snapshot and restore it.

Customer-managed keys in KMS allow automatic yearly rotation, but AWS-managed keys do not support user-controlled rotation.

Enforcing TLS connections on RDS requires setting the 'rds.force_ssl' parameter to '1' in the DB parameter group.

For Oracle and SQL Server RDS instances, Transparent Data Encryption is an additional database-level option that is redundant if RDS encryption is already enabled.

Cross-account use of encrypted RDS snapshots requires granting permissions to the KMS key in the source account and using a separate KMS key in the target account.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Encryption at Rest

Protects data stored on disk, backups, and snapshots

Uses AWS KMS to encrypt and decrypt data at the storage layer

Does not protect data while it travels across the network

Encryption in Transit

Protects data while it moves over a network (client to server or server to server)

Uses TLS certificates managed by AWS Certificate Manager (ACM)

Does not protect data stored on disk

Customer-Managed KMS Key

Created and managed by the user in KMS

Supports automatic yearly rotation

User can view key policy and grant cross-account access

AWS-Managed KMS Key

Created automatically by an AWS service (e.g., RDS)

Rotation is managed by AWS and cannot be user-configured

User cannot modify the key policy or see the full key details

RDS Encryption (Server-Side)

Encrypts the entire storage volume of the RDS instance

Available for all RDS database engines (MySQL, PostgreSQL, Oracle, etc.)

Does not require changes to database configuration or application code

Transparent Data Encryption (TDE)

Encrypts individual database files at the database engine level

Only available for Oracle and SQL Server RDS instances

Requires enabling a database engine-specific option (e.g., TDE for Oracle)

Watch Out for These

Mistake

Encryption at rest means the database data is always encrypted even when the database is running and serving queries.

Correct

Encryption at rest encrypts the data when it is stored on disk. When the database is running and queries are executed, the data is decrypted in memory for processing. The data in memory is not encrypted at rest.

Beginners confuse 'at rest' with 'always encrypted'. The term 'at rest' specifically refers to the state of data when it is not moving or being used.

Mistake

If I enable encryption at rest on my RDS database, all network traffic to the database is automatically encrypted too.

Correct

Encryption at rest and encryption in transit are completely independent settings. Enabling encryption at rest does not encrypt network traffic. You must separately enforce TLS connections for encryption in transit.

People assume that one encryption setting covers everything, but AWS treats storage encryption and network encryption as separate configuration options.

Mistake

I can easily switch encryption on for an existing RDS database by modifying the database in the console.

Correct

You cannot enable encryption on an existing unencrypted RDS database by modifying it. You must create a snapshot, copy the snapshot with encryption enabled, and then restore the database from that encrypted snapshot.

The RDS modification options do not include a toggle for encryption. This limitation surprises many beginners who are used to modifying other database settings.

Mistake

AWS KMS keys and TLS certificates are the same thing and serve the same purpose.

Correct

KMS keys are used for encryption at rest (scrambling data on disk). TLS certificates are used for encryption in transit (creating a secure network tunnel). They are different cryptographic constructs managed by different services (KMS vs ACM).

Both involve 'keys' and 'encryption', so beginners conflate them. The exam tests your ability to distinguish which service is appropriate for each use case.

Mistake

Once I enable encryption at rest, all my backups, replicas, and snapshots are automatically encrypted with the same key.

Correct

When you enable encryption on an RDS instance, you can choose whether to use the same key or a different key for backups and replicas. By default, they use the same key, but you can override this. Also, manual snapshots can be copied with a different key.

Beginners assume the key choice is locked in, but AWS gives you flexibility. The exam may ask about cross-region copy of encrypted snapshots, which requires using a different KMS key in the target region.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

Can I encrypt an existing unencrypted RDS database without downtime?

No. You must create a snapshot of the database, copy the snapshot with encryption enabled, and restore the database from the encrypted snapshot. There will be a brief period of unavailability during the restore process.

What is the difference between a customer-managed key and an AWS-managed key in KMS?

A customer-managed key is created and managed by you, allowing you to control key policies, enable automatic rotation, and view usage logs. An AWS-managed key is created automatically by a service (like RDS) and cannot be modified or rotated by you.

Do I need both RDS encryption and Transparent Data Encryption for Oracle?

No. RDS encryption encrypts the entire storage volume, which includes the database files. TDE is an additional database-level encryption that is redundant when RDS encryption is already enabled. You only need one layer of encryption at rest.

How do I renew an expired TLS certificate on an RDS instance?

Obtain a new certificate from ACM or import a new one. Then modify the RDS instance in the console to use the new certificate. RDS will not automatically renew certificates — you must update the certificate assignment manually.

Can I share an encrypted RDS snapshot with another AWS account?

Yes, but you must grant permissions to the KMS key used to encrypt the snapshot in the source account. The target account must specify a different KMS key (from their own account) when they copy the snapshot.

Does enabling encryption at rest affect database performance?

There is a very small performance overhead (usually less than 5%) because the encryption and decryption operations happen at the storage layer. For most workloads, the impact is negligible and is far outweighed by the security benefits.

Terms Worth Knowing

Keep going

You've finished Database Encryption at Rest and in Transit. Continue through the DBS-C01 study guide to build a complete picture of the exam.

Done with this chapter?