Amazon Relational Database Service (RDS) allows to easily host and manage a relational database in the cloud. RDS databases can be encrypted, ensuring the security of data-at-rest. In the case that adversaries gain physical access to the storage medium they are not able to access the data.

Ask Yourself Whether

There is a risk if you answered yes to any of those questions.

Recommended Secure Coding Practices

It’s recommended to encrypt databases that contain sensitive information. Encryption and decryption are handled transparently by RDS, so no further modifications to the application are necessary.

Sensitive Code Example

For aws_db_instance:

resource "aws_db_instance" "database" {
  storage_encrypted = false  # Sensitive, disabled by default
}

Compliant Solution

For aws_db_instance:

resource "aws_db_instance" "database" {
  storage_encrypted = true
}

See